search for: oiddat

Displaying 2 results from an estimated 2 matches for "oiddat".

Did you mean: oiddate
2014 Nov 10
2
range () does not remove NA's with complete.cases() for dates (dplyr/mutate)
...ated using the dplyr/mutate(). The console and the reproducible example are given below. Any advice how to resolve this issue would be appreciated. Thanks, Pradip Muhuri ################# cut and pasted from the R console #################### id mrjdate cocdate inhdate haldate oiddate 1 1 2004-11-04 2008-07-18 2005-07-07 2007-11-07 2008-07-18 2 2 <NA> <NA> <NA> <NA> <NA> 3 3 2009-10-24 <NA> 2011-10-13 <NA> 2011-10-13 4 4 2007-10-10 <NA> <NA> <NA> 2007-10-1...
2014 Nov 09
4
Getting the most recent dates in a new column from dates in four columns using the dplyr package (mutate verb)
Hello, The example data frame in the reproducible code below has 5 columns (1 column for id and 4 columns for dates), and there are 7 observations. I would like to insert the most recent date from those 4 date columns into a new column (oiddate) using the mutate() function in the dplyr package. I am getting correct results (NA in the new column) if a given row has all NA's in the four columns. However, the issue is that the date value inserted into the new column (oidflag) is incorrect for 5 of the remaining 6 rows (with a non-NA...