search for: labdat

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

Did you mean: labrat
2005 May 24
3
obtaining first and last record for rows with same identifier
I have a dataframe that contains fields such as patid, labdate, labvalue. The same patid may show up in multiple rows because of lab measurements on multiple days. Is there a simple way to obtain just the first and last record for each patient, or do I need to write some code that performs that. Thanks, Steven
2011 Nov 09
1
Invalid 'yscale' in viewport
...to plot dates. However, my data are two numeric vectors. The strange part is that these vectors are in fact date differences -- they started life as dates -- but I've already converted them to numeric, like so: $ cogdiff <- as.numeric(cogdate - scandate)/365.24 $ labdiff <- as.numeric(labdate - scandate)/365.24 When I check is(cogdiff) and is(labdiff) it tells me that both are numeric vectors. And if I put these variables into other plotting routines (e.g. plot(), qplot()), I get the expected output. So on some level the conversion to numeric has "worked." However: as a s...