[BioC] Parameter names must by syntactically valid names in R
Karl Brand
k.brand at erasmusmc.nl
Mon Feb 1 21:43:02 CET 2010
Thank you Seth,
On 2/1/2010 6:51 PM, Seth Falcon wrote:
> Hi Karl,
>
> On 2/1/10 8:54 AM, Karl Brand wrote:
> => Anyone that could shed light on the error-
>>
>> "Parameter names must by syntactically valid names in R"
>
> <snip>
>
>> Of particular note is that identical code run 24 hrs earlier on a
>> different machine succeeded without this error. Unfortunately i do not
>> have sessionInfo from that session and wont be able gain it as such any
>> time soon.
>
> Hmm, that part is curious, but I don't think we have enough information
> to comment usefully.
My bad: looks like some one (definitely not me, uhuh...) changed the
code in the intervening period.
> <snip>
>> > colnames(design)
>> [1] "TissueC" "TissueR" "PperiodLO"
>> [4] "PperiodSH" "Timeb" "Timec"
>> [7] "Timed" "Timee" "Timef"
>> [10] "Timeg" "Timeh" "Timei"
>> [13] "Timej" "Timek" "Timel"
>> [16] "Timem" "Timen" "Timeo"
>> [19] "Timep" "TissueR:PperiodLO" "TissueR:PperiodSH"
>
> Those last two do not look like valid names to me. The ":" is not
> allowed in naked identifiers in R.
I didn't know this. Strange (to me) that R outputs these identifiers for
the columns with interaction; which obviously need relabeling.
> You could try converting the ":" to "." or "_". Perhaps:
>
> colnames(design) <- sub(":", "_", colnames(design))
Worked a charm, though i did get this warning:
Warning message:
In contrasts.fit(fit, cont.matrix) :
row names of contrasts don't match col names of coefficients
So tried:
> rownames(contrasts) <- colnames(coefficients)
Which appear's to solve the problem (even though i dont realise the
extent of the consequences of this action the output looked about right).
Another disgruntled biologist assuaged. Big cheers,
Karl
> HTH,
>
> + seth
>
--
Karl Brand <k.brand at erasmusmc.nl>
Department of Genetics
Erasmus MC
Dr Molewaterplein 50
3015 GE Rotterdam
lab +31 (0)10 704 3409 fax +31 (0)10 704 4743 mob +31 (0)642 777 268
More information about the Bioconductor
mailing list