[R] Unable to create histograms

Spencer Graves spencer.graves at pdf.com
Thu Feb 17 00:29:52 CET 2005


      Are you sure it's numeric?  Have you looked at the following: 

      class(db1$var1)

      Do you mean "hist(db1$Var1)"?  R is case sensitive. 

      Importing data from an Excel spreadsheet was discussed earlier 
today on this list.  My favorite, contributed by Gabor Grothendieck, was 
to select what you want in Excel, then "Copy", then use the following in 
R: 

	  read.delim2("clipboard", header = FALSE)

	  Werner Wernersen then reported that it works the other way around as well:  

write.table(x, file("clipboard"), sep="\t")

      hope this helps.  spencer graves    

Radha Chebolu wrote:

>Hi,
>could someone pelase help me with this?
>
>My data set's name is db1(say) and one of the
>variables is var1. I gave the command:
>hist(db1$var1). The values of Var1 are numbers.
>I got an error which says: 'x' must be numeric.
>Sometimes it works for other datasets and it's not
>working for this dataset. Also, does R let us import
>data from an excel spreadhsheet?
>
>Thanks,
>Radha
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>  
>




More information about the R-help mailing list