@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
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
: 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
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
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
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),
-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
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
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
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
10 matches
Mail list logo