Dear all,
I apologize for the newbie question, but I'm stuck.
I have a data frame in the following form:
dat-as.data.frame(cbind(c(a,a,a,b,b), c(1,2,3,3,2),c(4,3,5,4,4)))
I need a way to generate a new dataframe with the average for each factor.
The result should look like:
Dear all,
Let's say I have the following data.frame:
dat-data.frame(x=rnorm(100), y=rnorm(100,2))
and I plot a histogram of variable x, somethink like:
hist(dat$x, breaks=-5:5)
Now, I'd like to color each bar according to the mean of the cases
according to y. For instance, the color of the bar
Dear all,
If I do a PCA like this:
dat-matrix(rnorm(30),ncol=3)
res-prcomp(dat)
Now, imagine that I got new data that I want to project onto the
original PC axes. How do I do that?
Thanks!
John
__
R-help@r-project.org mailing list
I have some data files in which some fields have multiple values. For example
first last sex major
John Smith M ANTH
Jane DoeF HIST,BIOL
What's the best R-like way to handle these data (Jane's major in my example),
so that I can do things like summarize the other fields by
On Apr 6, 2012, at 9:09 AM, John D. Muccigrosso wrote:
I have some data files in which some fields have multiple values. For example
first last sex major
John Smith M ANTH
Jane DoeF HIST,BIOL
What's the best R-like way to handle these data (Jane's major in my
I cannot for the life of me figure this out:
What's the parameter to fill in with color circles made with circles()? col
changes the line color, but all I see in the help is a reference to additional
graphic parameters, and no examples via google.
Thanks!
John Muccigrosso
Am I wrong that barplot is supposed to just skip NAs, and continue with the
rest of the data in a matrix column? That's how I read various posts on the
subject.
But that's not what happens for me with R64.app (on a Mac, obviously). For
example:
d0 - as.matrix(c(2,3,4))
d1 -
On 12 Mar 2012, at 12:47 , S Ellison wrote:
Yes, to the extent that the default barplot plots the height of the bar so
far as the sum of teh values so far, starting at teh first. For your first
vector, no problem; for your second, the highest value is undefiuned, for the
third, the sum is
8 matches
Mail list logo