On 03/20/2011 04:33 AM, andrew456 wrote:
Thanks a lot for teaching me!!! By the way,one more question,how do i plot a
boxplot of that??

Hi Andrew,
As you seem to be an R newbie and some of the replies may have been cryptic to a newbie, try this:

boxplot(a$Life.Expectancies.at.Birth)

To explain the above a little bit, when reading in a text file, R does some silent substitutions, like sticking full stops (.) in where there were spaces in the field labels. The dollar sign operator means "return the list element of "a" - a data frame column in this case - that has the name after the dollar sign. That gives the "boxplot" function a vector of numeric values and it knows what to do. These things are so familiar to most of us that we don't bother to explain them. You will probably encounter more of these little mysteries as you progress with R. Good luck.

Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to