On Mar 24, 2010, at 8:38 AM, Oscar Franzén wrote:
> Dear all,
>
> I'm trying to find a a way to remove certain fields belonging to the same
> group from a data frame structure.
>
> I have a data frame like this:
>
> foo v1 v2 v3
> 1 1 a
> 6 2 a
> 3 8 a
> 4 4 b
>
Try this:
subset(foo, v3 %in% names(which(!table(foo$v3) < 3)))
On Wed, Mar 24, 2010 at 10:38 AM, Oscar Franzén
wrote:
> Dear all,
>
> I'm trying to find a a way to remove certain fields belonging to the same
> group from a data frame structure.
>
> I have a data frame like this:
>
> foo v1 v2
Dear all,
I'm trying to find a a way to remove certain fields belonging to the same
group from a data frame structure.
I have a data frame like this:
foo v1 v2 v3
1 1 a
6 2 a
3 8 a
4 4 b
4 4 b
2 1 c
1 6 d
Each row can then be group
3 matches
Mail list logo