[R] How do I convert factors to numeric? It's an FAQ but...

2012-04-13 Thread John Coulthard
Dear R list people I loaded a file of numbers into R and got a dataframe of factors. So I tried to convert it to numeric as per the FAQ using as.numeric(). But I'm getting errors (please see example), so what am I getting wrong? Thanks for your time. John Example... #my data object > f

[R] scatterplot3d; scaling point symbols to depth of graph

2010-10-28 Thread John Coulthard
Hi I'm trying to scale the point symbols on a 3d plot so that the ones at the front are larger than the ones at the back. I'm trying to give the image some perspective. Given this code... library(scatterplot3d) data=array(c(0,5,9), c(3,3)) scatterplot3d(data, pch=19, cex.symbols=10-data[,2],

[R] Repeated measures lme or anova

2008-07-04 Thread John Coulthard
Hi As I can't find an example of my data structure I'd like some advice on which is the most appropriate test for significant effects. If I should be using either lme or anova, is the relevant example below the best/correct way to do the test? The Data... 2 groups of patients (5 in GroupA, 7