[R] FW: Document1

Uwe Ligges ligges at statistik.uni-dortmund.de
Wed Feb 2 09:53:43 CET 2005


Brett Stansfield wrote:

> 
>> -----Original Message-----
>>From: 	Brett Stansfield  
>>Sent:	Wednesday, 19 January 2005 4:25 p.m.
>>To:	'S.Ganesh at massey.ac.nz'
>>Subject:	Document1
>>
>> <<Doc1.doc>>  I was trying to get R to analyse one variable of the file
>>Chicken Weight. when I ask 
>>
>>hist(data$weight)
>>R says "x must be numeric"
>>yet when I check the data using Editor, it says quite clearly that
>>variable name weight is numeric.

Guess you have a factor rather than numeric. Use R functions to check 
it, e.g. str().



>>what am I doing wrong here? I have attached a view from the console


docs are stripped.


Uwe Ligges


>>Brett
>>Brett Stansfield 
>>Environmental Scientist - Water Quality 
>>Hawke's Bay Regional Council 
>>102 Vautier Street 
>>Private Bag 6006 
>>Napier 
>>Phone (06) 835-9200 extn 9334 
>>Fax (06) 835-3601 
>>
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>______________________________________________
>>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