You could use the by() function after a little data manipulation.
The first line will create a field just of the date portion of your datetime
field. Then you can use the by() function to use the indices you desire to
calculate the mean.
mSamp$cDT <- chron(unlist(strsplit(as.character(mSamp$Col
write.table() using the sep="," and file extension as .csv works great to pull
directly into excel.
?write.table
Without more detail as to the problem, it is difficult to give a more specific
answer.
Adrian
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...
:djmu...@gmail.com]
Sent: Wednesday, January 26, 2011 4:57 PM
To: KATSCHKE, ADRIAN CIV DFAS
Subject: Re: [R] applying a set of rules to each row
Hi:
I don't see the need for this labyrinth of if statements. Here's a way that I
think solves the CSRS block with only one ifelse statement:
dates(SCDCivLeave+(365.25*5)),
NA))), NA))
Adrian
>If I understand you correctly, you want ?ifelse, which works on
All,
I would like to apply a set of rules to each row of the sample data set
below. The rule sets are the guidelines for determining an individual's
date for retirement eligibility. The rules are found in this document,
http://www.opm.gov/feddata/RetirementPaperFinal_v4.pdf. I am only
interested i
5 matches
Mail list logo