[R] Data-frame selection
Jeff Newmiller
jdnewmil at dcn.davis.CA.us
Sun Oct 11 21:53:37 CEST 2015
Sorry, looked like there were a different number of rows in the results because the rownames were different. I also see that the OP was interested in any Groups, not just the two in the example, so your solution probably meets the requirements better than mine
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On October 10, 2015 5:40:37 PM PDT, peter dalgaard <pdalgd at gmail.com> wrote:
>
>> On 11 Oct 2015, at 02:12 , Jeff Newmiller <jdnewmil at dcn.davis.ca.us>
>wrote:
>>
>> Sorry I missed the boat the first time, and while it looks like Peter
>is getting closer I suspect that is not quite there either due to the
>T2 being considered separate from T3 requirement.
>
>Er, what do you mean by that?
>
>As far as I can tell, we're selecting the same observations:
>
>> teste[kp,]
> ID Group Var
>1 3 T2 0.32
>2 4 T3 1.59
>3 1 T2 2.94
>4 1 T2 3.23
>5 1 T2 1.40
>6 1 T2 1.62
>7 1 T2 2.43
>8 1 T2 2.53
>9 1 T2 2.25
>10 1 T3 1.66
>11 1 T3 2.86
>12 1 T3 0.53
>13 1 T3 1.66
>14 1 T3 3.24
>15 1 T3 1.34
>21 2 T2 2.00
>22 2 T2 2.39
>23 2 T2 1.65
>24 2 T2 2.05
>25 2 T2 2.75
>26 2 T2 2.23
>27 2 T2 1.39
>28 2 T2 2.66
>29 2 T2 1.05
>30 2 T3 2.52
More information about the R-help
mailing list