search for: attenmpt

Displaying 1 result from an estimated 1 matches for "attenmpt".

Did you mean: attempt
2012 Nov 29
1
Coerce rownames to factor for ordering
...t data DataToPlot.. <- data.frame("Location1" = c(100,200),"Location2" = c(200,400)) #Name rowns rownames(DataToPlot..) <- c("Fall","Summer") #Attempt to coerce row names to factors rownames(DataToPlot..) <- as.factor(rownames(DataToPlot..)) #Attenmpt to sort rownames by defined vector rownames(DataToPlot..)<- reorder(as.factor(rownames(DataToPlot..)), new.order = c("Summer","Fall","Winter","Spring")) The rownames do not reorder nor do they remain factors. Perhaps I can just sort these in the plo...