similar to: Convert H:MM:SS PM /AM into 24 HR syntax

Displaying 20 results from an estimated 10000 matches similar to: "Convert H:MM:SS PM /AM into 24 HR syntax"

2009 Mar 14
2
Format about Date and time
I have a data set like this: > head(FormatedData) ID Target Actual Date Time 1 2030 0 -57.0 12/20/08 17:03:00 2 2030 90 90.0 12/20/08 18:41:00 3 2030 45 43.8 12/21/08 14:36:00 4 2030 0 -23.8 12/21/08 19:30:00 5 2030 90 90.2 12/21/08 21:48:00 6 2030 45 48.6 12/22/08 13:02:00 I wan to convert the format of Date and Time, so I did this: pdate
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
2007 Jun 12
1
Can strptime handle milliseconds or AM/PM?
I'm trying to proess date/time fields from files that were given to me to analyze. Any clues what I'm doing wrong with strptime? This seems to fail the same way under Linux or Windows. For ?strptime would it make sense to explain %OS3 somewhere besides the Examples? > # Why does %OS3 work here? > format(Sys.time(), "%H:%M:%S") [1] "16:45:19" >
2006 Mar 11
2
how to create analog stripchart plots of x vs t (t=mm/dd/yyyy hh:mm:ss)
Hello r-experts, I sure could us a little help. I have an ever updating text file with timestamped data in it. I can reformat in anyway I want if need be but currently I have chosen to make columns of date, time and measuresed value (comma delimeted and with the dates and times in quotes to interpret them as strings). Here is a small section of my text data file:
2010 May 24
2
AM/PM strptime %p failing 2.11.0 WinXP
I am attempting to import dates in the following format to R: 5/20/2010 6:45:32 PM Unfortunately I am unable to get the AM/PM function (%p) to work correctly under either 2.11.0 or 2.8.1. > strptime("5/20/2010 6:45:32 PM", "%m/%d/%Y %I:%M:%S %p") [1] NA but > strptime("5/20/2010 6:45:32", "%m/%d/%Y %I:%M:%S") [1] "2010-05-20 06:45:32"
2013 Jan 17
1
Can strptime handle milliseconds or AM/PM?
Readers, Responding to an old post (http://tolstoy.newcastle.edu.au/R/e2/help/07/06/18850.html), and using the example in the manual: monthextract<-strptime("20/2/06 11:16:16.683", "%m") monthextract [1] NA Why is the result 'NA' and not '2'? -- r2151
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
2009 Nov 20
6
How to add a top level title to multiple plots
How can I add an overall plot title to these four plots? I would like to have something that says, "Distribution Comparisons": par(mfrow = c(2, 2)) # Plot 1 plot(rnorm(10),type="l",col="red") title(main = list(paste("Normal"), ????????????????????????? col="black", cex = 1.0)) # Plot 2 plot(rpois(10,
2009 Aug 04
5
Stacked plots with common x-axis and different y-axis
Is there a place that shows how to create two plots that are stacked on top of each other where they share a common x-axis scale, but have differnt y-axis scale? Say have the following data: airquality Stack plot(airquality$Day, airquality$Wind) on top of plot(airquality$Day, airquality$Temp). I am interested in stacking the two on top of each other with no seam, or plotting the two lines with
2004 Jul 29
3
2 questions : format and hh:mm
Dear R-users, i have two questions : 1- first of all, i wish to know the way to obtain a serie with a format like "00" : ( "01","02","03","04"....) or like postal code ("01100","02222"). for instance, i do : > format(strptime(as.character(c(1:4)),"%H"),"%H") but it sounds complicate and not really
2007 Dec 14
3
How to convert Datetime numbers from Excel to POSIXt objects
Hi all, I need to compare time series data files of different time formats. I had no problems with text format using strptime. But how can I convert datetime numbers from Excel (days since 30.12.1899 00:00:00) into POSIXt objects? For example 29770.375 should be converted to "03.07.1981 09:00:00" I tried the following code and encountered strange results: t1-t0 gives 29770.33
2009 Jul 09
4
Issues with file.info?
Are there any tricks associated with file.info? I just tried it on a directory folder and it returned NA for all fields for all files. I tried it on a different folder with different files and it still returned NA. I tried it on a specific file and it returned all the proper info correctly. Just wondering if there are any tricks I've overlooked.
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
2009 Jan 03
2
R Stacked Histogram
I've seen this asked, but never fully answered.  Is it possible to plot stacked histograms in R? I have four data sets that I would like to show combined vertically in histogram format.  Is this possible?  Thank you for any feedback you can provide. P.S. I know I can show the four sets side by side, but I want to combine them, but still uniquely identify each.   Thanks again.
2009 Feb 04
5
Target Plot?
I've done a little snooping around the R Gallery Site (http://addictedtor.free.fr/graphiques/) and the "Statistics with R" site (http://zoonek2.free.fr/UNIX/48_R/all.html), but I can't seem to find what I'm looking for.  Here is the type of plot I would like to draw: (1) 2-D three axis plot where each axis is separated by 120-degrees (would be great if the number of axis
2009 Aug 01
1
R Package That Contains International Geomagnetic Reference Field (IGRF)
By any chance is anyone aware of an R package that contains a representation of the International Geomagnetic Reference Field (IGRF)? http://www.ngdc.noaa.gov/IAGA/vmod/igrf.html I've tracked down some Fortran and C code for the IGRF-10, and possibly IGRF-11, and was hoping to avoid an awkward port. Thanks again for any feedback and leads provided.
2009 May 26
2
Problem accessing "row number" from subset on a dataframe
I would like to use the "row number" information returned from performing a subset command on a dataframe. For example, I would like to automatically delete some rows from a dataframe if they match a criteria. Here is my example below. data(airquality) names(airquality) subset(airquality, airquality$Month == 6) Now how do I delete the row numbers returned automatically? I
2007 Aug 07
1
how to convert decimal date to its equivalent date format(YYYY.mm.dd.hr.min.sec)
Hello R Users, How to convert decimal date to date as YYYY.mm.dd.hr.min.sec For example, I have decimal date in one column , and want to convert and write it in equivalent date(YYYY.mm.dd.hr.min.sec) in another next six columns. 1979.000000 1979.020833 1979.041667 1979.062500 Is it possible in R ? Kindly help, Regards, Yogesh -- Dr. Yogesh K. Tiwari, Scientist, Indian Institute
2008 Oct 05
2
Time Interval calculation using R
Hi I have two columns of data with time in form of HH:MM:SS - representing start time and end time of an activity. I am trying to calculate the time difference (duration of the activity). (1) I first tried > difftime(btime, etime, units = "mins") This however gave me the error - Error in as.POSIXlt.character(as.character(x)) : character string is not in a standard unambiguous
2009 Jul 09
5
Best way to export values from a function?
Maybe there is a great website out there or white paper that discusses this but again my Google skills (or lack there of) let me down. I would like to know the best way to export several doubles from a function, where the doubles are not an array. Here is a contrived function similar to my needs: multipleoutput<-function(x) { squared<-x^2 cubed<-x^3 exponentioal<-exp(x)