search for: rhssp

Displaying 1 result from an estimated 1 matches for "rhssp".

2012 Jun 05
1
preserving date formats in functions
Hi there! I have two date columns in a dataframe I need to selectively collapse based on missing values and which date comes first (imported from an text file). This is what I did: RHSSP$CT <- as.POSIXct(RHSSP$CT, format='%m/%d/%y %H:%M') RHSSP$MRI <- as.POSIXct(RHSSP$MRI, format='%m/%d/%y %H:%M') RHSSP$Scan <- ifelse(is.na(RHSSP$MRI),RHSSP$CT,ifelse(is.na(RHSSP$CT),RHSSP$MRI,ifelse(RHSSP$CT>RHSSP$MRI,RHSSP$MRI,RHSSP$CT))) RHSSP$CT and RHSSP$MR...