Re: [R] Calculate monthly means

2011-03-15 Thread KATSCHKE, ADRIAN CIV DFAS
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

Re: [R] Export R dataframes to excel

2011-03-01 Thread KATSCHKE, ADRIAN CIV DFAS
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...

Re: [R] applying a set of rules to each row

2011-01-27 Thread KATSCHKE, ADRIAN CIV DFAS
: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:

Re: [R] applying a set of rules to each row

2011-01-26 Thread KATSCHKE, ADRIAN CIV DFAS
dates(SCDCivLeave+(365.25*5)), NA))), NA)) Adrian >If I understand you correctly, you want ?ifelse, which works on

[R] applying a set of rules to each row

2011-01-26 Thread KATSCHKE, ADRIAN CIV DFAS
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