I have a dataframe that contains time values in the form of yyyy-mm-dd hh:mm i.e. 2010-07-14 13:00. When I convert this to numeric via tvec <- as.numeric(Time) I get a number that is in seconds. So far so good. When I then divide the numeric value by the number of seconds in a day eg tvec/(60*60*24) I only get integer values and not fraction of a day which is what I want.
What do I need to do to get decimal days? Tschüß Tony Meissner Principal Scientist (Monitoring) Resources Monitoring Group Science, Monitoring and Information Division Department for Water "Imagine" © *(ph) (08) 8595 2209 *(mob) 0401 124 971 *(fax) (08) 8595 2232 * 28 Vaughan Terrace, Berri SA 5343 PO Box 240, Berri SA 5343 DX 51103 ***The information in this e-mail may be confidential and/or legally privileged. Use or disclosure of the information by anyone other than the intended recipient is prohibited and may be unlawful. If you have received this e-mail in error, please advise by return e-mail or by telephoning +61 8 8595 2209 [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.