Why is 19 March, 1947 a little longer than one day?
x <- as.POSIXct("1947-04-16")
julian(x, origin = as.POSIXct("1947-03-20"))
Time difference of 27 days
julian(x, origin = as.POSIXct("1947-03-19"))
Time difference of 28.04167 days
> julian(x, origin = as.POSIXct("1947-03-18"))
Time difference of 29.04167 days
I am running R-1.7.1 compiled on RedHat 9.0
Laimonis
--
Dr Laimonis Kavalieris
Department of Mathematics and Statistics
University of Otago
PO Box 56 Dunedin
New Zealand
Tel (64)(3)479 7780
Fax (64)(3)479 8427
Sorry about wasing time - Apparently NZ daylisght saving time finished on March 20, 1947 , and on March 3, 1980, and March 20, 2000 . I'm impressed that R knows all of this Laimonis -- Dr Laimonis Kavalieris Department of Mathematics and Statistics University of Otago PO Box 56 Dunedin New Zealand Tel (64)(3)479 7780 Fax (64)(3)479 8427
Hi
I have some data that was prepared while I was Sweden. The columns
labelled using ? or ? are fine, but for some reason ? is changed to a
period.
so Bl?b?r stay the same, but D?dved becomes D.dved
I'd like to keep to original variable names
the data is read in using
vegFreqFull <- read.csv("/dat/neil/voles/veg/FrequentFull.csv",
header=TRUE)
Using R 1.70 on Win 2K SP4
Regards
Neil
--
Dr Neil A. White
Senior Lecturer
Department of Biology
University of the South Pacific
PO Box 1168, Suva
Fiji Islands
Tel: +679 321 2409
Fax: +679 331 5601
www.usp.ac.fj/biology
On Wed, 2 Jul 2003, Laimonis Kavalieris wrote:> Why is 19 March, 1947 a little longer than one day?A change from Daylight Savings Time in your time zone (unstated), according to your OS. Note, 0.04167 is exactly one hour, not `a little longer'.> x <- as.POSIXct("1947-04-16") > > julian(x, origin = as.POSIXct("1947-03-20")) > Time difference of 27 days > > julian(x, origin = as.POSIXct("1947-03-19")) > Time difference of 28.04167 days > > > julian(x, origin = as.POSIXct("1947-03-18")) > Time difference of 29.04167 daysYou can just subtract dates. In the UK> x - as.POSIXct("1947-03-19")Time difference of 27.95833 days -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595