myfunction <- function(y){
y <- rnorm(100)
mean(y)
}
myfunction()
[1] 0.05248908
dir()
[1] "myfunction.R"
source("myfunction.R")
Error in source("myfunction.R") : myfunction.R:2:3: unexpected symbol 1: 2: R version
I just started learning R programming, any help will be appreciated.. thank you