[BioC] contrast matrix syntax error

Gordon Smyth smyth at wehi.edu.au
Thu Jan 15 00:20:08 MET 2004


In R, variables are not allowed to have names with start with numbers. This 
affects the makeContrasts() function. Please choose colnames for your 
design matrix which do not start with numbers.

Try make.names(colnames(design)) to see whether R considers your colnames 
to be valid variable names.

Gordon

At 08:38 AM 14/01/2004, Simon Melov wrote:
>Hi,
>I am trying to make some contrasts in limma. I keep getting a syntax 
>error. My design is read in ok, as well as everything else upto making a 
>contrast matrix.
>
>design
>    4day 9day 14day 19day 14daf 19daf 4daf 9daf control
>1    -1    0     0     0     0     0    0    0       0
>2    -1    0     0     0     0     0    0    0       0
>3    -1    0     0     0     0     0    0    0       0
>4    -1    0     0     0     0     0    0    0       0
>5     0   -1     0     0     0     0    0    0       0
>6     0   -1     0     0     0     0    0    0       0
>7     0   -1     0     0     0     0    0    0       0
>
>....42 arrays.
>
>contrast.matrix <- 
>makeContrasts(4day,9day,14day,19day,14daf,19daf,4daf,9daf,control,4day-19day,levels=design) 
>
>Error: syntax error
>
>What am I doing wrong?
>
>thanks
>
>Simon.



More information about the Bioconductor mailing list