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]]

