Re: [R] FW: Selecting undefined column of a data frame (was[BioC]read.phenoData vs read.AnnotatedDataFrame)

2007-08-04 Thread Steven McKinney
@stat.math.ethz.ch Subject: Re: [R] FW: Selecting undefined column of a data frame (was[BioC]read.phenoData vs read.AnnotatedDataFrame) I see now that for my example foo - data.frame(Filename = c(a, b)) foo[, FileName] NULL the issue is in this clause of the [.data.frame extractor. The lines

[R] FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)

2007-08-03 Thread Steven McKinney
Hi all, What are current methods people use in R to identify mis-spelled column names when selecting columns from a data frame? Alice Johnson recently tackled this issue (see [BioC] posting below). Due to a mis-spelled column name (FileName instead of Filename) which produced no warning, Alice

Re: [R] FW: Selecting undefined column of a data frame (was [BioC]read.phenoData vs read.AnnotatedDataFrame)

2007-08-03 Thread Steven McKinney
: Selecting undefined column of a data frame (was [BioC]read.phenoData vs read.AnnotatedDataFrame) Hi all, What are current methods people use in R to identify mis-spelled column names when selecting columns from a data frame? Alice Johnson recently tackled this issue (see [BioC] posting below). Due

Re: [R] FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)

2007-08-03 Thread Prof Brian Ripley
You are reading the wrong part of the code for your argument list: foo[FileName] Error in `[.data.frame`(foo, FileName) : undefined columns selected [.data.frame is one of the most complex functions in R, and does many different things depending on which arguments are supplied. On Fri, 3

Re: [R] FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)

2007-08-03 Thread Steven McKinney
McKinney Cc: r-help@stat.math.ethz.ch Subject: Re: [R] FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame) You are reading the wrong part of the code for your argument list: foo[FileName] Error in `[.data.frame`(foo, FileName) : undefined

Re: [R] FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)

2007-08-03 Thread Prof Brian Ripley
I've since seen your followup a more detailed explanation may help. The path through the code for your argument list does not go where you quoted, and there is a reason for it. Generally when you extract in R and ask for an non-existent index you get NA or NULL as the result (and no warning),

Re: [R] FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)

2007-08-03 Thread Steven McKinney
-Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Fri 8/3/2007 1:05 PM To: Steven McKinney Cc: r-help@stat.math.ethz.ch Subject: Re: [R] FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame) I've since

Re: [R] FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame)

2007-08-03 Thread Steven McKinney
Ripley [mailto:[EMAIL PROTECTED] Sent: Fri 8/3/2007 1:05 PM To: Steven McKinney Cc: r-help@stat.math.ethz.ch Subject: Re: [R] FW: Selecting undefined column of a data frame (was [BioC] read.phenoData vs read.AnnotatedDataFrame) I've since seen your followup a more detailed explanation may

Re: [R] FW: Selecting undefined column of a data frame (was [BioC]read.phenoData vs read.AnnotatedDataFrame)

2007-08-03 Thread Bert Gunter
programming. Bert Gunter Genentech -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven McKinney Sent: Friday, August 03, 2007 10:38 AM To: r-help@stat.math.ethz.ch Subject: [R] FW: Selecting undefined column of a data frame (was [BioC]read.phenoData vs

Re: [R] FW: Selecting undefined column of a data frame (was [BioC]read.phenoData vs read.AnnotatedDataFrame)

2007-08-03 Thread Steven McKinney
Hi Bert, -Original Message- From: Bert Gunter [mailto:[EMAIL PROTECTED] Sent: Fri 8/3/2007 3:19 PM To: Steven McKinney; r-help@stat.math.ethz.ch Subject: RE: [R] FW: Selecting undefined column of a data frame (was [BioC]read.phenoData vs read.AnnotatedDataFrame) I suspect