Re: [R] re shape package - use one cast() instead of many

2009-05-05 Thread jwg20
re "+" (i.e. I can change it to Animacy+CogStat and get a_COG,a_nCOG, a_(all), etc.) hadley wrote: > > On Tue, May 5, 2009 at 3:03 PM, jwg20 wrote: >> >> I have a data set that I'm trying to melt and cast in a specific way >> using >> the reshap

[R] re shape package - use one cast() instead of many

2009-05-05 Thread jwg20
I have a data set that I'm trying to melt and cast in a specific way using the reshape package. (I'll use the ff_d dataset from reshape so I don't have to post a toy data set here. ) Lets say I'm looking for the interaction of treatment with each type of "variable" in ff_d. Using the command belo

Re: [R] Calculating First Occurance by a factor

2009-04-01 Thread jwg20
Thanks! That did it. I should have seen that I needed the comma! hadley wrote: > >> I tried messing with the line df$FixTime[which.min(df$FixInx)] changing >> it >> to df[which.min(df$FixInx)] or adding new lines with the additional >> columns >> that I want to include, but nothing seemed to

Re: [R] Calculating First Occurance by a factor

2009-04-01 Thread jwg20
df$FixTime[which.min(df$FixInx)] >} > ) > >> On Mon, Mar 30, 2009 at 3:40 PM, jwg20 wrote: >>> >>> I'm having difficulty finding a solution to my problem that without >>> using a >>> for loop. For the amount of data I (wil

[R] Calculating First Occurance by a factor

2009-03-30 Thread jwg20
I'm having difficulty finding a solution to my problem that without using a for loop. For the amount of data I (will) have, the for loop will probably be too slow. I tried searching around before posting and couldn't find anything, hopefully it's not embarrassingly easy. Consider the data.frame