Type
?mean
?sd
in the R prompt. For your specific goal, type
mean(r[1:25])
in the prompt. Proceed analogously for sd
Just download one of the very many beginner's manuals or introductory
course materials that you get for free on the internet, and get Ricci's
R-refcard.
Daniel
-
foo is the data frame you provided
mean(foo[1:25,2])
var(foo[1:25,2])
indexing key:
foo[rows,cols]
hth
Stephen Sefick
On Tue, Oct 20, 2009 at 11:04 AM, Sibusiso Moyo wrote:
> This is day one on R for me, I am trying to figure out how to do simple
> computations. For example I have a data set
2 matches
Mail list logo