Displaying 1 result from an estimated 1 matches for "msales".
Did you mean:
sales
2010 Oct 30
2
Using names function
...g on my journey to learn R and the book I am using is "Using R for Introductory Statistics"
One of the problems (page 15, 1.10) goes as follows:
The monthly sales fig for 2002 were (2700, 2600, 3050, . . ). Using diff() find the month with greatest increase from prev month.
I created a msales var:
msales = c(2700, 2600, 3050 . . )
I named them:
names(msales)=c("Jan", Feb", "Mar" . . .)
to find the month with greatest increase from prev month:
max(diff(msales))
I get the numeric value displayed when I execute the above function, but not the month. cumsum(msale...