[R] Frequency table to histogram

Luc Villandre villandl at dms.umontreal.ca
Tue Apr 7 16:00:55 CEST 2009


Hi Mary,

Could you please provide a copy of the first few lines of your frequency 
table (with only relevant columns)? I think this could help many 
potential contributors understand in more details what you're trying to do.

Cheers,

Luc

Mary Winter wrote:
>  
>
> I have read a frequency table in to R called "temp."  I now want to create a histogram table from it, but I obviously first have to expand the data - to the sample size of 100. I want to use the command rep(), but I'm not sure how to go about it..I tried using the code:
>
>  
>
> temp1<-rep(temp$Chest,100)
>
> hist(temp1)
>
>  
>
> But this creates a v. odd histogram so I know it must be wrong!
>
>  
>
> Would be very grateful if any one could help me out!
>
>  
>
> Mary
>
> _________________________________________________________________
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>




More information about the R-help mailing list