ware
> wdunlap tibco.com
>
>
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
>> Behalf
>> Of R. Michael Weylandt
>> Sent: Thursday, August 09, 2012 4:22 PM
>> To: arun
>> Cc: R help;
tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of R. Michael Weylandt
> Sent: Thursday, August 09, 2012 4:22 PM
> To: arun
> Cc: R help; jimi adams
> Subject: Re: [R] indexing in data frames
>
On Thu, Aug 9, 2012 at 5:30 PM, arun wrote:
>
> lapply(1:length(a$c),function(x) a$b[x]-a$c[[x]])
Arun,
I've seen you use this idiom a few times lately and I'd just like to note that
seq_along()
is an (underutilized) primitive and a safer and faster alternative
(avoiding the pathological leng
ab <- data.frame(ab, diff=ab$year-ab$d)
>> new <- split(ab$diff, ab$group)
>> new
> $G1988
> [1] 3 6 4
>
> $G1989
> [1] 1 9
>
> --
> David L Carlson
> Associate Professor of Anthropology
> Texas A&M Univer
-
> From: jimi adams
> To: r-help@r-project.org
> Cc:
> Sent: Thursday, August 9, 2012 4:42 PM
> Subject: [R] indexing in data frames
>
> I'm still not fully understanding exactly how R is handling data frames, but
> am getting closer. Any help with this one will likel
HI,
In the reply I sent, I forgot to add,
anew<-list()#before,
for(i in 1:length(b1)){
anew[[i]]<-list()
anew[[i]]<-b1[[i]]-c[[i]]
}
A.K.
- Original Message -
From: jimi adams
To: r-help@r-project.org
Cc:
Sent: Thursday, August 9, 2012 4:42 PM
Subject: [R] indexing in da
-2 -6
A.K.
- Original Message -
From: jimi adams
To: r-help@r-project.org
Cc:
Sent: Thursday, August 9, 2012 4:42 PM
Subject: [R] indexing in data frames
I'm still not fully understanding exactly how R is handling data frames, but am
getting closer. Any help with this one will likely
ge -
From: jimi adams
To: arun
Cc: R help
Sent: Thursday, August 9, 2012 5:42 PM
Subject: Re: [R] indexing in data frames
Thanks. Yes, I got it to work with loops for small data. I was just hoping,
given the size of the data.frame (hundreds of thousands) and the length of the
lists (varying
> -Original Message-
> From: David Winsemius [mailto:dwinsem...@comcast.net]
> Sent: Thursday, August 09, 2012 5:17 PM
> To: dcarl...@tamu.edu
> Cc: 'jimi adams'; r-help@r-project.org
> Subject: Re: [R] indexing in data frames
>
>
> On Aug 9, 2012, at 2:43 PM, D
$year-ab$d)
new <- split(ab$diff, ab$group)
new
$G1988
[1] 3 6 4
$G1989
[1] 1 9
--
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
-Original Message-
From: r-help-boun...@r-project
; project.org] On Behalf Of jimi adams
> Sent: Thursday, August 09, 2012 3:43 PM
> To: r-help@r-project.org
> Subject: [R] indexing in data frames
>
> I'm still not fully understanding exactly how R is handling data
> frames, but am getting closer. Any help with this one will li
I'm still not fully understanding exactly how R is handling data frames, but am
getting closer. Any help with this one will likely go a long way in getting me
there. Let's say I have a data frame, let's call it "a". Within that data frame
i have two variables, let's call them "b" and "c", where
12 matches
Mail list logo