I have probably a rather simple question but R produces constantly errors if I try to assign a variable.
Example:
x <- c(1, 2, 3)
mean(x)
If I run this code in a R script the console reports the following error message:
Error in mean(x) : object 'x' not found
If I run the same code in the console everything works. I don't know why this happens right now, it worked in the past.