r/Rlanguage • u/[deleted] • Feb 25 '17
Help with my R code?
I have a sample of 5, 17, 4, 10, 2, 45 How can I order this sample in R and calculate the mean? I am new to using R and I have tried different things and it does not work. I know I can use a calculator and calculate it quickly but I Want to learn how to use R. Thank you
0
Upvotes
3
5
0
3
u/squid_brain Feb 25 '17 edited Feb 26 '17
you need to first input the data like so:
The arrow assignes the stuff on the right to the thing on the left. The c() is used to include a combination of things. from there, figure out how to use mean()