[R] Histogram from a single column of a data frame

Richard Lerner richardl at uchicago.edu
Fri Sep 26 19:57:35 CEST 2014


Column 7 of "oded" is "Breed". If I enter
> summary(Breed)
I get the counts of the numbers in each breed.
However, if I enter


I have tried

> hist($Breed)
Error: unexpected '$' in "hist($"

> hist(Breed)
Error in hist(Breed) : object 'Breed' not found

> hist("Breed")
Error in hist.default("Breed") : 'x' must be numeric

FYI

> colnames(oded)
[1] "Subject.Name"       "Date"               "Species"
"Age"                "Sex"
[6] "Spayed....Neutered" "Breed"              "Breed.Code"

How do I get a histogram of the counts in column 7?


Thanks
Richard

	[[alternative HTML version deleted]]



More information about the R-help mailing list