I am using the R version of 3.6.1 GUI 1.70 El Capitan build (7684) in Mac os. And I tried to write a function:
myfunction <- founction(x) {
y <- rnorm(100)
mean(y)
}
Then I copy and paste the above command on the console, though I got the result: mean, I also noticed two errors about "{":
myfunction <- founction(x) {
>Error: unexpected '{' in "myfunction <- founction(x) {"
y <- rnorm(100)
mean(y)
[1] 0.0758422
}
Error: unexpected '}' in "}"
Could someone give me some advice?