Displaying 5 results from an estimated 5 matches for "min_vec".
Did you mean:
min_vect
2017 Dec 09
2
Remove
...ues ranged between 40 and 50.
> group C I want keep rows that have " x" values ranged between 60 and 75.
When you have a problem where there are multiple "parallel: parameters, the function to "reach for" is `mapply`.
mapply( your_selection_func, group_vec, min_vec, max_vec)
... and this will probably return the values as a list (of dataframes if you build the function correctly, so you may may need to then do:
do.call(rbind, ...)
--
David.
>
>
> DM <- read.table( text='GR x y
> A 25 125
> A 23 135
> A 14 145
> A 35 230...
2017 Dec 09
0
Remove
...0 and 50.
>> group C I want keep rows that have " x" values ranged between 60 and 75.
>
> When you have a problem where there are multiple "parallel: parameters, the function to "reach for" is `mapply`.
>
> mapply( your_selection_func, group_vec, min_vec, max_vec)
>
> ... and this will probably return the values as a list (of dataframes if you build the function correctly, so you may may need to then do:
>
> do.call(rbind, ...)
do.call( rbind,
mapply( function(dat, grp, minx, maxx) {dat[ dat$GR==grp & dat$x >= minx &...
2017 Dec 09
1
Remove
...I want keep rows that have " x" values ranged between 60
> and 75.
> >
> > When you have a problem where there are multiple "parallel: parameters,
> the function to "reach for" is `mapply`.
> >
> > mapply( your_selection_func, group_vec, min_vec, max_vec)
> >
> > ... and this will probably return the values as a list (of dataframes if
> you build the function correctly, so you may may need to then do:
> >
> > do.call(rbind, ...)
>
> do.call( rbind,
> mapply( function(dat, grp, minx, maxx) {dat[...
2017 Dec 09
0
Remove
Hi David, Ista and all,
I have one related question Within one group I want to keep records
conditionally.
example within
group A I want keep rows that have " x" values ranged between 15 and 30.
group B I want keep rows that have " x" values ranged between 40 and 50.
group C I want keep rows that have " x" values ranged between 60 and 75.
DM <-
2017 Dec 07
4
Remove
> On Dec 6, 2017, at 4:27 PM, Ashta <sewashm at gmail.com> wrote:
>
> Thank you Ista! Worked fine.
Here's another (possibly more direct in its logic?):
DM[ !ave(DM$x, DM$GR, FUN= function(x) {!length(unique(x))==1}), ]
GR x y
5 B 25 321
6 B 25 512
7 B 25 123
8 B 25 451
--
David
> On Wed, Dec 6, 2017 at 5:59 PM, Ista Zahn <istazahn at gmail.com> wrote: