[R] calculating the mean of a random matrix (by row) and some general questions
RichardLang
lang at zedat.fu-berlin.de
Tue Jul 19 20:43:37 CEST 2011
Hi everyone!
I'm trying to teach myself R in order to do some data analysis. I'm a
mathematics student and (only) familiar with matlab and latex. I'm working
trough the "official" introduction to R at the moment, while simultaneously
solving some exercises I found in the web. Before I post my (probably
stupid) question, I'd like to ask you for some general advice. How do you
work with R? Is it like in matlab, that you write your functions with a lot
of loops etc. in a textfile and then run it? Or do you just prepare your
data and then use the functions provided by R (plot, mean etc) to get some
analysis? I'd be very thankfull for some of your thoughts about
"approaches".
Now the question: I'm trying to build a vector with n entries, each
consisting of the mean of m random numbers (exponential distributed for
example). My approach was to construct a nxm random matrix and then to
somehow take the mean of each row. But in the mean function there is no
parameter to do this, so the intended approach of R is probably different..
any ideas? =)
Richard
--
View this message in context: http://r.789695.n4.nabble.com/calculating-the-mean-of-a-random-matrix-by-row-and-some-general-questions-tp3678964p3678964.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list