Displaying 1 result from an estimated 1 matches for "mkdf".
Did you mean:
mdf
2008 Mar 20
3
Problem with diff(strptime(...
Hi all,
I have been chipping away at a problem I encountered in calculating
rates per year from a moderately large data file (46412 rows). When I
ran the following command, I got obviously wrong output:
interval<-
c(NA,as.numeric(diff(
strptime(mkdf$MEAS_DATE,"%d/%m/%Y")))/365.25)
The values in MEAS_DATE looked like this:
mkdf$MEAS_DATE[1:10]
[1] 1/5/1962 1/5/1963 1/5/1964 1/3/1965 1/4/1966 1/4/1967
1/6/1968
[8] 25/3/1969 1/4/1971 1/2/1974
146 Levels: 10/10/1967 1/10/1947 1/10/1965 1/10/1967 1/10/1983 ... 9/1/1992
To a...