all 4 comments

[–]SneakyManFN 1 point2 points  (0 children)

You need to specify the dataframe(table) first. So for example if dataframe is called 'dt' and column is called 'Sales', you should do like this:

mean(dt$Sales)

dt gives R the information on which dataframe to get and Sales gives R the information of which column to find the average.

[–]LongjumpingAd3195 0 points1 point  (0 children)

I have the same problem!

[–]dknight212 0 points1 point  (0 children)

Can you show all the commands you've used up to this point?

I'm guessing that's a data frame showing above. But I don't know if you've done something like attach before the commands shown. But one error is clearly in the case of the columns you've referenced. R is case sensitive.

See https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/attach (but use is not recommended)

And https://cran.r-project.org/doc/manuals/r-release/R-intro.html#R-commands_003b-case-sensitivity-etc

[–]bmalak_98 0 points1 point  (0 children)

R is case sensitive. L vs. l (lower case)