similar to: Convert Time Variable to Numeric

Displaying 20 results from an estimated 12000 matches similar to: "Convert Time Variable to Numeric"

2004 May 12
1
convert.times in chron, error when 59 < seconds < 60 (PR#6878)
Full_Name: Dennis Wolf Version: 1.9.0 OS: Mac OS 10.3.3 Submission from: (NULL) (160.91.76.23) platform powerpc-apple-darwin6.8 arch powerpc os darwin6.8 system powerpc, darwin6.8 status major 1 minor 9.0 year 2004 month 04 day
2010 Feb 16
3
converting character vector "hh:mm" to chron or strptime 24 clock time vectors
Hi All, I am attempting to work with some data from loggers. I have read in a .csv exported from MS Access that already has my dates and times (in 24 clock format), (with StringsAsFactors=FALSE). > head(tdata) LogData date time 1 77.16 2008/04/24 02:00 2 61.78 2008/04/24 04:00 3 75.44 2008/04/24 06:00 4 89.43 2008/04/24
2002 Apr 08
1
Problem(?) in strptime() -- short version
I decided my earlier email on this topic was rather long and wordy; here's a condensed version. I am sitting at a Solaris computer in the US/Pacific timezone. I have a file of data having times that includes the following three values 2002-4-7 1:30:00 GMT 2002-4-7 2:30:00 GMT 2002-4-7 3:30:00 GMT I have not been able to find a way to correctly convert these to either of the POSIX
2004 Apr 22
3
POSIXct vs Dates
I noticed the addition of the Dates class for dates without times, in R 1.9. I am making extensive use of POSIXct at present and would like to know whether it is worth changing to Dates. What are a few of the trade-offs? Thanks, Frank --- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University
2003 Oct 17
7
datetime data and plotting
If I take the following simple data: YEAR MONTH DAY WEIGHT.KG 2003 10 6 1.2 2003 10 12 1.2 2003 10 16 1.3 and format the date data and plot it: dates <- strptime(paste(DAY,MONTH,YEAR),"%d%m%Y") plot(c(min(dates),max(dates)),c(0,max(WEIGHT.KG)), xlab="Date",ylab="Weight (kg)",type="n") lines(dates,WEIGHT.KG) points(dates,WEIGHT.KG) I find that the
2004 Feb 23
6
Need help on parsing dates
I know this: > library(date) > x="1979-04-04" > try=as.date(x, "ymd") > print(try) [1] 4Apr79 and that `x' here has to be a string, e.g.: > x=1979-04-04 > print(x) [1] 1971 I'm stuck in reading from a file. I say: > A <- read.table(file="try") > print(A) V1 V2 1 1979-04-04
2009 Mar 17
2
Converting time from HH:MM:SS to only HH:MM
Hi all, I need to compare between times and put all similar times in specific 1 minute bins. Unfortunately the original data include seconds as well. My data is in HH:MM:SS format but I need it rounded to only HH:MM and trying in Excel to display "unique" records only does not work since the seconds are not unique. Is there an easy way using perhaps CHRON to change all from the
2005 Jul 28
4
CSV file and date. Dates are read as factors!
I am using read.csv to read a CSV file (produced by saving an Excel file as a CSV file). The columns containing dates are being read as factors. Because of this, I can not compute follow-up time, i.e. Followup<-postDate-preDate. I would appreciate any suggestion that would help me read the dates as dates and thus allow me to calculate follow-up time. Thanks John John Sorkin M.D., Ph.D. Chief,
2009 Nov 03
1
Calculate Averages for time data
Hello I have time data which is in hh:mm:ss format and I need to calculate averages for this data. I tried converting the data as integer so that I could calculate the average, but it doesn't serve the purpose. I tried using Chron package also. But I am stuck up as to how to deal with the time data. Please guide me as to how to deal with Time data in R. Thank you in advance Regards Sunita
2011 Jul 28
3
how to shift a chron timestamp by 6:30 hours
Dear help list, I have a timestamp in as a chron object: > (x <- chron(dates = c("12/02/11", "22/11/11"), + times = c("07:30:00", "04:00:00"), + format = c(dates = "d/m/y", times = "h:m:s"))) [1] (12/02/11 07:30:00) (22/11/11 04:00:00) Now I want to shift the timestamp by 06:30 (hh:mm) backwards, to get
2004 Jun 16
3
Aggregating on Water Year Rather Than Calendar Year
The US water year extends from 01 October yyyy-1 through 30 September yyyy and is referenced by the year starting on the included 01 January yyyy. I'd like to be able to find the annual means for the water year. To do so I've taken the input date-time, which is in the usual format "1991-10-07 10:35:00" changed it by: w$d<-as.POSIXct(w$date.time) Now I can add an
2005 Jul 13
2
convert to chron objects
Hi, I have a column of a dataframe which has time stamps like: > eh$t[1] [1] 06/05/2005 01:15:25 and was wondering how to convert it to chron variable. Thanks a lot. Young.
2010 Jun 18
5
extract date time from a text file
I a have a text file where every line is like that: "2007-12-03 13:50:17 Juan Perez" ("yy-mm-dd hh:mm:ss First Name Second Name") I would like to make a data frame with two column one for date and the other one for name. When I use read.delim it was transformed in a data frame with 4 colums. Bye, Sebasti?n.
2009 Jul 16
6
Best way to replace :SS with :00
Not sure if there is an R way to do this or a regular express way, but here is what I am trying to do. I've got lots of data where the format is HH:MM:SS, but I need to format it like HH:MM:00, i.e. round the second down to zero. What is the best way to do this? Thanks again. Jason
2004 Apr 02
2
How canI convert date-time to Julian date?
Hello!! I need some help! I tried everything, but nothing worked! I have a vector c with dates in it, in the format "2004-04-01" and i need to convert it in the form "04/01/2004" or "01/04/2004" ! How can i do that?? Thanks Bye Martina --
2010 Oct 25
4
zoo.read intraday data
Hello all, I'm trying to use zoo.read but can't figure out how to deal with the time format. (example below) would be nice if someone could help. best regards, Immanuel --------------------------- L <- "Date,Time,Open,High,Low,Close,Up,Down 05.02.2001,00:30,421.20,421.20,421.20,421.20,11,0 05.02.2001,01:30,421.20,421.40,421.20,421.40,7,0
2011 Oct 05
2
any way to convert back to DateTime class when "accidental" conversion to numeric?
Hi, In short, I would like to know if there is any way to convert a numeric into a date, similar to how strptime() can convert a string to a date time class? There are some functions, etc. which don't work well with dates, and tend to force them into numerics. I understand that the number it spits back is the number of seconds since the beginning of 1970 (see the first few sentences
2005 May 21
2
print format for difftime
Has anyone written a function that will print a difftime in the form: hh:mm:ss or yy-mm-dd hh:mm:ss depending on the actual size. (sloppy notation for months/minutes, but surely you get the point). Bendix ---------------------- Bendix Carstensen Senior Statistician Steno Diabetes Center Niels Steensens Vej 2 DK-2820 Gentofte Denmark tel: +45 44 43 87 38 mob: +45 30 75 87 38 fax: +45 44 43 07
2014 Jul 09
4
Conversion date a numeric y vuelta a date
Hola a todos: Debe de ser una tonterĂ­a, pero no consigo saber porque la siguiente linea no devuelve la fecha actual: as.Date(as.numeric(Sys.time())) He hecho esa prueba porque no consigo pasar un numero convertido a partir de una fecha y modificado a fecha de nuevo. Gracias por adelantado. Un saludo, Alberto. [[alternative HTML version deleted]]
2004 Apr 29
1
Entering times around the start of daylight savings time
I'm having problems entering dates and times around when daylight savings time starts. If I type (on R 1.8.1 on Gentoo Linux) > ISOdatetime(2004,4,4,0:4,0,0,"GMT") [1] "2004-04-03 19:00:00 EST" "2004-04-03 20:00:00 EST" [3] "2004-04-03 22:00:00 EST" "2004-04-03 22:00:00 EST" [5] "2004-04-03 23:00:00 EST" Giving the times