[R] How to set a filter during reading tables
yanlinlin82 at gmail.com
Sun May 31 19:21:13 CEST 2009
I think you can use readLines(n=1) in loop to skip unwanted rows.
On Mon, Jun 1, 2009 at 12:56 AM, <guox at ucalgary.ca> wrote:
> Thanks, Juliet.
> It works for filtering columns.
> I am also wondering if there is a way to filter rows.
> Thanks again.
>> One can use colClasses to set which columns get read in. For the
>> columns you don't
>> want you can set those to NULL. For example,
>> cc <- c("NULL",rep("numeric",9))
>> myData <-
>> On Wed, May 27, 2009 at 12:27 PM, <guox at ucalgary.ca> wrote:
>>> We are reading big tables, such as,
>>> Chemicals <-
>>> = TRUE, sep = '\t', as.is =T)
>>> I was wondering if it is possible to set a filter during loading so
>>> we just load what we want not the whole table each time. Thanks,
>>> R-help at r-project.org mailing list
>>> PLEASE do read the posting guide
>>> and provide commented, minimal, self-contained, reproducible code.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help