search for: birthdt

Displaying 5 results from an estimated 5 matches for "birthdt".

2012 Jan 24
6
Checking for invalid dates: Code works but needs improvement
...a single character vector. 3. It prints out the incorrect dates but doesn't indicate which date variable they belong to. I tried various things with paste but never came up with anything that worked. Ideally, I'd like to get something that looks roughly like: Error: Invalid date values in birthDT "21931-11-23" "1933-06-31" Error: Invalid date values in diagnosisDT "2010-02-30" 4. There's no way to specify names for input and output data. I imagine this would be fairly easy to specify this in the arguments to a function but am not sure how to incorporat...
2011 Jan 26
2
applying a set of rules to each row
..., 39.55, 22.75, 23.26, 20.71, 19.69, 30.16, 35.88, 22.14, 38.42, 32.99, 18.28, 37.52, 39.7)), .Names = c("DOB", "srvCompDT", "retirePlan", "ageFedStart"), row.names = c(NA, 200L), class = "data.frame") rrDT <- function(retSys, ageFedStart, birthDT, serviceCompDT){ if(retSys == "CSRS") { if(ageFedStart < 25) rtDT <- dates(birthDT+(365.25*55)) else if (ageFedStart >= 25 & ageFedStart < 30) rtDT <- dates(serviceCompDT+(365.25*30)) else if (ageFedStart >= 30 & ageFedStart < 40) r...
2012 Jan 26
0
R-help Digest, Vol 107, Issue 25
...a single character vector. 3. It prints out the incorrect dates but doesn't indicate which date variable they belong to. I tried various things with paste but never came up with anything that worked. Ideally, I'd like to get something that looks roughly like: Error: Invalid date values in birthDT "21931-11-23" "1933-06-31" Error: Invalid date values in diagnosisDT "2010-02-30" 4. There's no way to specify names for input and output data. I imagine this would be fairly easy to specify this in the arguments to a function but am not sure how to incorporat...
2012 Jan 18
4
R-Help
I am trying to create a frequency distribution and I am a bit confused. Here are the commands I have entered: > data <- read.csv(file="40609_sortedfinal.csv",head=TRUE,sep=",") > NumberOfActionsByStatus = data$STATUS > NumberOfActionsByUser = data$ETS_LOGIN > NumberOfBidOffer = data$BID_OFFER > NumberOfActionsByUser.freq = table(NumberOfActionsByUser) >
2010 Feb 23
0
subtracting 100 from strptime year vector generates missing values in POSIXct where none appear to exist in strptime year vector
...802] "2034-08-10" "2034-08-10" "2021-12-24" "2021-12-24" "2021-12-24" "2028-03-28" "2028-03-28" "2028-03-28" "2028-04-09" [811] "2028-04-09" "2028-04-09" > dt1=strptime(as.character(dat$BIRTHDT),'%d-%b-%y'); dt1$year=dt1$year-100; as.POSIXct(dt1) [1] "1922-07-14 BST" "1922-07-14 BST" "1922-07-14 BST" "1922-07-14 BST" "1921-03-23 GMT" "1921-03-23 GMT" "1921-03-23 GMT" [8] "1927-08-27 BST" "1927...