[R] How to subset a data frame to include only first events

2013-02-05 Thread Dylan Arena
Hi there, I have data frame with columns ID and Date. There are multiple rows for each ID, but I only want to keep the *first* such row--i.e., the row corresponding to the earliest event. So if I had, say, 1000 rows of 100 IDs doing an average of ten events each, I'd run this trimming procedure

Re: [R] How to subset a data frame to include only first events

2013-02-05 Thread Dylan Arena
Update: A bit more digging and I found duplicated() ( http://tolstoy.newcastle.edu.au/R/e4/help/08/06/13592.html). Sorry for the premature request for help! On Mon, Feb 4, 2013 at 6:29 PM, Dylan Arena wrote: > Hi there, > > > I have data frame with columns ID and Date. There

[R] Trouble with R CMD check: I can't seem to get dependencies right (maybe I'm using R_LIBS incorrectly?)

2008-09-04 Thread Dylan Arena
Hi there, I'm in the following directory: ~/Documents/Rstuff/diceFiles/dice_1.1 The directory "dice" is in this directory, with all the usual build files (DESCRIPTION, NAMESPACE, etc). I'm trying to run the following command: R CMD check dice (where "dice" is the name of the package I'm chec