similar to: Time and Date formatting

Displaying 20 results from an estimated 20000 matches similar to: "Time and Date formatting"

2012 Aug 02
2
Help on merging without a common variable
Dear All, I want to create a dataset for a NONMEM simulation. I have a dataframe with individual PK parameters and want to create a dosing sceinario in a second dataframe. I want to merge them both so that every individiual's PK parameters are combined with the dosing scenario into one. I do not have a common variable to merge and cbind is giving error that lengths are different. I
2012 May 02
2
selection by two unique variables
Dear Group, I am working with a large dataset where I need to select for each unique id the the unique lastpk row. Here is a sample subject: id wtdt wt lastpk 64050256 2010-09-18 275 2010-09-16 64050256 2010-09-19 277 2010-09-18 64050256 2010-09-20 272 2010-09-18 64050256 2010-09-21 277 2010-09-18 I want the result as:
2010 Jul 30
1
Formatting datetime data for gantt.chart.
Overall goal: I'd like to have a visual representation of when certain computer applications are running over the course of a day (data will come from a SQL query later, but I'm using a csv for now). My idea is to use a gantt chart, but I'm running into issues with the start and end time. I'm wondering if it's because I need to use hours instead of days as my unit of time.
2011 Sep 08
2
help subsetting data based on date AND time
Dear R Community, I am new to R, and have a question that I suspect may be quite simple but is proving a formidable roadblock for me. I have a large data set that includes water-quality measurements collected over many 24-hour periods. The date and time of sample collection are in a combined Date/Time field in the format yyyy-mm-dd hh:mm:ss. I need to be able to subset the data for analysis of
2012 Apr 17
6
ActiveRecord with different Date/Time format
I have an application where user sets his/her preferred date/time format. User is expected to enter datetime in his preferred format across the application. Now the problem is for few formats the datetime is parsed wrongly while create/update ActiveRecord. For example user has set date/time format in hh:mm dd/MM/yyyy. Now if user enters 17:00 04/05/2012 it parses it as 5 PM 5 Apr, 2012 where it
2012 Jan 11
6
Generating unque patient IDs
Dear group, I am trying to prepare a NONMEM friendly dataset for population PK analysis. My patient IDs are 10 digit long and NONMEM is losing precison and rouding the last couple of digits. I need to generate unique Patient IDs fromt he current 10-digit IDs. Ihave total 250 subjects so I appreciate if anybody can suggest me a way to code this in R. Regards, Ayyappa [[alternative HTML
2009 Oct 05
6
Date-Time-Stamp input method for user-specific formats
Date-Time-Stamp input method to correctly interpret user-specific formats:coding is 90% there - based on exmple at http://tolstoy.newcastle.edu.au/R/help/05/02/12003.html ...anyone got the last 10% please? CONTEXT: Data is received where one of the columns is a datetimestamp. At midnight, the value represented as text in this column consists of just the date part, e.g.
2012 Aug 03
2
Density plots
Dear group, I need help on two problems: 1. I am trying to plot density plots for each individual in 8 occasions. I can do this by subject wiht the code below: par(mfrow=c(4,2)) plot(density(all8scenarios$SIMCONC[all8scenarios$ID==1&all8scenarios$WSEQ==0])) plot(density(all8scenarios$SIMCONC[all8scenarios$ID==1&all8scenarios$WSEQ==1]))
2004 May 17
1
Plotting Time against Date for time series data?
Dear all, I have a data set containing GPS fixes of animal locations. To check that the GPS's are working properly, I would like to plot the time of the fixes (y-axis) against the date of the fixes (x-axis). If all works well, the plot should show four regular fixes per day. The x-axis should be labelled with month/year (i.e. 11/04) and the y-axis by hour from 00 to 24. I would like to
2004 May 19
2
POSIX to ts and back to POSIX
I am trying to use POSIX datetime objects rather than chron datetime objects but am having difficulty with POSIX in a time series. My question: Once a POSIXct vector is bound to a time series, is there a function to convert back to POSIXct? The following code demonstrates what I am trying to do. > ts(as.POSIXct(strptime(tmp,"%m/%d/%Y %H:%M:%S")),freq=1440) Time Series: Start =
2009 Sep 20
2
Date/Time to date & time
Hi, Can strptime (or some other function) help me turn the following column of a data.frame into two new columns, one as date and the other as time, preserving the AM/PM value? Thanks, Mark > B ENTRY DATE 1 3/23/2009 6:30:00 AM 2 3/23/2009 6:30:00 AM 3 3/23/2009 6:39:00 AM 4 3/23/2009 6:39:00 AM 5 3/23/2009 6:48:00 AM 6 3/23/2009 6:48:00 AM 7 3/23/2009 7:00:00 AM
2011 Aug 29
2
Plot history
Dear R group, I am trying to plot uisng a for loop. Here is the script: for (i in unique(cfn$ID)){ plot(cfn$TIME[cfn$ID==i],cfn$DV[cfn$ID==i],pch=16)} I could access only the last plot of the series and cannot go back to see all the plots. I appreciate your help in resolving this issue and also please suggest how I can export the plots as a pdf or other format files for publication purposes.
2007 Mar 21
1
bug and patch: strptime first-of-month error in (possibly unsupported use of) "%j" format (PR#9577)
Full_Name: John Brzustowski Version: R-devel-trunk OS: linux (problem under Windows too) Submission from: (NULL) (74.101.124.238) (This bug was discovered by Phil Taylor, Acadia University.) I'm not sure from reading the documentation whether strptime(x, "%j") is meant to be supported, but if so, there is a bug which prevents it from working on the first day of months after
2004 Oct 19
2
Sweave and Trellis in R 2.0.0patched (Windows)
I've been using the following code to plot using Sweave in version 1.9.1 library(RODBC) library(lattice) channel <-odbcConnectExcel("h:/water.xls") data <- sqlQuery(channel,"select * from `Sheet1$` where Test = 'TOC' and (Valve='5010-05' or Valve='8030-V26' or Valve='1180-08' or Valve='5040-08')") odbcClose(channel) srt <-
2008 Oct 02
1
Time conversion
I'm trying to convert a variable that is imported from CSV into a datetime,I'm trying to use the strptime function but with no joy, can anyone offer any advise? i have a vector timestamp 07-07-2008-21:03:55 07-07-2008-19:52:55 07-07-2008-19:54:14 07-07-2008-15:24:01 07-07-2008-13:39:17 07-07-2008-13:39:55 timestamp<-strptime(timestamp,"%d-%m-%y-%H:%M:%S") ## then filter on
2012 Feb 29
1
Coding help
Dear Group, I have the following dataset: ID REPI DV CONC SS 1 1 156.84 116 0 1 2 146.56 116 0 1 3 115.13 116 0 1 4 207.81 116 0 1 5 129.53 116 0 1 6 151.48 116 0 1 7 158.95 116 0 1 8 192.37 116 0 1 9 32.97 116 0 1 10 151.66 116 0 I want to calculate the percentile of each CONC within ID=i and add as a column
2010 Oct 13
1
Date Time Objects
I am trying to convert an array from numeric values back to date and time format. The code I have used is as follows; for (i in 0:(length(DateTime3)-1)) { DateTime3[i] <- (strptime(start, "%m/%d/%Y %H:%M")+ i*interval) where start <- [1] "1/1/1981 00:00" However the created array (DateTime3) contains [1,] 347156400 347157600 347158800 347160000 347161200 347162400
2008 Jul 09
4
Strptime/ date time classes
Dear all, I've come across a problem using strptime, can anyone explain what's going on? I'm using version 2.7.0 on Windows XP. Thank you Caroline First read in a data file using read.table alldata = read.table(file, header=F, skip=4, colClasses = c("character","numeric")) dim(alldata) [1] 223960 2 # inefficient, safe way of sorting out missing or dodgy
2011 May 10
1
Converting ordinal dates and time into sensible formats
Hello all, I am having a little trouble working with "strptime" and I was hoping someone might be able to give me a hand. I have an instrument that outputs an ordinal date and time in two columns something like this: day.hour min.sec 1 12525 2050 2 12518 2029 3 12524 2023 4 12524 2028 5 12507 2035 Now the problem I am having is converting these numbers
2004 Jun 14
4
Coercing a dataframe column to datetime
I am trying to coerce a data frame column from character to datetime using strptime but keep getting an error because the length of the coerced object is always 9. What am I doing wrong here: ................................................................. > ds <- cbind(1:2, c("02/27/92 23:03:20", "02/27/92 22:29:56")); ds [,1] [,2] [1,]