[R] ggplot - class "character" problem

RCulloch ross.culloch at dur.ac.uk
Tue Sep 13 13:32:41 CEST 2011


I suspect it is to do with your method of creating the dataframe, I would
check to see if the columns in the df are numeric, which you can do by: 

is.numeric(flat_data$time) 

for each variable, if it is not numeric (and at least one must be a
character, given the error message) then redefine as a numeric

flat_data$time<-as.numeric(flat_data$time) 

I reckon people better versed in R will have a more efficient solution, but
that should work......

Ross

--
View this message in context: http://r.789695.n4.nabble.com/ggplot-class-character-problem-tp3809657p3809786.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list