myfunction <- function() (
x <- rnorm(100)
mean(x)
)
When I attempt to copy this to the console it gives the following error:
Error: unexpected symbol in:
"x <- rnorm(100)
mean"
Then when I type myfunction into the console as instructed I get this:
function()
x <- rnorm (100)