[R] looking for a string
[Ricardo Rodriguez] Your XEN ICT Team
webmaster at xen.net
Tue Apr 15 23:48:12 CEST 2008
Thanks all,
markleeds at verizon.net wrote:
>> From: "[Ricardo Rodriguez] Your XEN ICT Team" <webmaster at xen.net>
>> Date: 2008/04/14 Mon PM 07:43:23 CDT
>> To: Henrique Dallazuanna <wwwhsd at gmail.com>, r-help at r-project.org
>> Subject: Re: [R] looking for a string
>>
>
> henrique means to use his command directly and
> forget about subset. subset probably doesn't
> let you do what you want to do.
>
>
Mark, I've finally found an example that helps me to understand what
Henrique said. Here it is:
## sometimes requiring a logical 'subset' argument is a nuisance
nm <- rownames(state.x77)
start_with_M <- nm %in% grep("^M", nm, value=TRUE)
subset(state.x77, start_with_M, Illiteracy:Murder)
Coming from http://wiki.r-project.org/rwiki/doku.php?id=rdoc:base:subset
What I am not able to understand yet is Charles's proposal. Any insight
will be welcome!
Cheers,
Ricardo
--
Ricardo Rodríguez
Your XEN ICT Team
More information about the R-help
mailing list