Hi, Although the following statements work individually in R, they produce an error if placed inside a function as below:
fsubt <- function(a) { b <- 1:length(a) b-a } The error message is: Error: unexpected input in: "b <- 1:length(a) b-" Any insight would be greatly appreciated. Thanks, Jack [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.