[R] subsetting
Bert Gunter
bgunter.4567 at gmail.com
Thu Feb 25 04:31:40 CET 2016
Have you gone through any R tutorials yet? I didn't entirely
understand your question (and so cannot answer), but this sounds like
a basic subsetting/data wrangling task that you should know how to do
if you have gone through a basic tutorial or two.
See also ?subset, ?"[" (basic indexing) and possibly also the plyR,
dplyr, or data.table packages that provide what some consider more
convenient and/or faster interfaces to these sorts of tasks.
See also: http://vita.had.co.nz/papers/tidy-data.pdf
for a nice article on "tidying" data (using plyr/dplyr).
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed, Feb 24, 2016 at 6:57 PM, Val <valkremk at gmail.com> wrote:
> Hi all,
>
> One of the the columns of a data frame has a value such like
>
> AAAAS-2001-yy
> AAAAS-2004-xx
> FFFFF-2007-SS
> and so on
>
> based on this column (variable) I want subset a data frame where the
> middle value of this variable is between 2001 to 2004.
> THE END RESULT THE DATA FRAME WILL BE THIS.
>
> AAAAS-2001-yy
> AAAAS-2004-xx
>
>
> THANK YOU IN ADVANCE
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> 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
mailing list