Philippe de Rochambeau wrote:

Hello,

how do you create a histogram with a data frame?

year snow.cover
1970 6.5
1971 12.0
1972 14.9
1973 10.0
1974 10.7
1975 7.9
...

mydata=data.frame(year=c(1970,...),snow.cover=c(6.5,...))

hist(mydata) does not work.

I guess you are not going to create a histogram but a barplot as in:


barplot(mydata$snow.cover, mydata$year, names = mydata$year)

Uwe Ligges


Many thanks.

PR

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to