similar to: How to create sequence of constant time interval

Displaying 20 results from an estimated 10000 matches similar to: "How to create sequence of constant time interval"

2009 Jan 30
1
How to collect arrays in an array?
Dear R-Experts, Seek your help. Please let me know how arrays of different sizes can be collected in one array. suppose I want to collect following arrays in one array. How can I do so? array(1): #row=3, #col=4(these columns store data of different types) array(2): #row=6, #col=4 array(3): #row=3, #col=4 .... want to store in Main_array How to define dimensions of Main_array? Thank you.
2009 Feb 05
1
help regarding storing time difference values in same unit?
Dear R-Experts, Seek your help. In a List object e.g. Time_duration[[]], I am storing differece between two time-stamps (start-time and end-time) for a certain event. Time difference does not remain constant for, say, 10 observations. Each time, the time difference is given in different time units: seconds / hours / minutes. Can you please tell me - how I can store the values of time
2009 Feb 08
1
How to print console output statements from within script or function?
Dear R-Experts, Seek your help. I am calling say 20 functions one by one in one script. To reach the end, it takes approximately one hour. While R is performing calculations, I would like to print console output statements to track the progress.(e.g. "Result of function-1 is done") Note: I have already tried "print" however, it did not work. Thank you in advance. Regards,
2009 Apr 02
1
help regarding converting the available date in "right" date
Dear R users, I have a table with say three columns and 70 rows. The second column has dates in format dd.mm.yy (i.e. 01.10.07 indicating record for October 1, 2007). I read the text file, containing the records. Now, I want to find out the weekday for each date. However, I cannot do so. 1) If I type result[1,"Date"] to see the Date in the first row, I get following output: 70
2010 Mar 04
2
missing date and time intervals in data frame
I posted a similar question, but feel it needs a bit more elaboration. I have a data frame (read from a csv file) that may have missing rows. Each day has 7 time intervals associated with it, with a range from 17:00 hrs to 18:00 hrs in 10 minute bins. What I am looking for is a script that will run through the data frame and insert "NA"in the Volume column for any dates that are
2008 Jun 26
1
Date Time Sequence
I would like a sequence of dates with a time step of 15 minutes starting: 1/1/2006 00:00:00 - 12/31/2006 23:45:00 function(x) { chron(sub(" .*", "", x), gsub(".* (.*)", "\\1:00", x)) } this is the piece of code I use to read in zoo objects for any help I would be grateful I have tried sequence and I can not seem to get it to work -- Let's not
2007 Jan 10
2
SAS and R code hazard ratios
Greetings, I am new to R and have been comparing CPH survival analysis hazard ratios between R and SAS PhReg. The binary covariates' HRs are the same, however the continuous variables, for example age, have quite different HRs although in the same direction. SAS PhReg produces HRs which are the change in risk for every one increment change in the independent variable. How do I
2009 Mar 24
1
CONFIDENCE INTERVAL FOR GLMER MODEL
I've built a poisson regression model for multiple subjects by using the GLMER function. I've also developed some curves for defining its limits but I did not succeed in developing confidence interval for the model's curve (confint or predict does not work - only for glm). Does anyone know how can I produce confidence interva for a glmer model? I'll appriciate any help... Liat --
2010 Apr 16
6
bwplot puts the bars in the wrong place
Dear R-Help, With the attached data set, I am still getting incorrect bwplots > xyplot(gdf$tt~gdf$OnHour |gdf$Runway, data=gdf) # Is correct > bwplot(gdf$tt~gdf$OnHour |gdf$Runway, data=gdf, horizontal=FALSE) # Puts the boxes on the wrong x-axis values # look especially at 0 and 3. How do I fix this? What is happening? Thanks, Jim Rome
2005 Feb 12
2
comparing predicted sequence A'(t) to observed sequence A(t)
Hi, I have a question that I have not been succesful in finding a definitive answer to; and I was hoping someone here could give me some pointers to the right place in the literature. A. We have 4 sets of data, A(t), B(t), C(t), and D(t). Each of these consists of a series of counts obtained in sequential time-intervals: so for example, A(t) would be something like: Count A(t): 25,
2011 May 09
2
Round down to earliest hour or half hour
I have times and would like to round down to the earliest 30 minute increment. For instance, a time of 2011-04-28 09:02:00 (the as.numeric value = 1303999320) I would like it to be rounded down to: 2011-04-28 09:00:00 (the as.numeric value = 1303999200) Any ideas of how to do this? ----- In theory, practice and theory are the same. In practice, they are not - Albert Einstein -- View this
2008 Jul 31
2
S 3 generic method consistency warning please help
I would like to include this in a package. The S3 methods on R CMD check says * checking S3 generic/method consistency ... WARNING window: function(x, ...) window.chron: function(data, day1, hour1, day2, hour2, ...) See section 'Generic functions and methods' of the 'Writing R Extensions' manual. I have looked and can not figure it out. This function is for convience. What
2009 Feb 04
1
How to declare an array with columns storing different datatypes/precision
Dear R- Experts, Seek your help. I want to creata data as follows. Ref_array with 4 columns. 1st column should store data of precision: 8.4 (i.e. 8 digits before decimal point and 4 digits after decimal points) 2nd column: should store data of type date "yyyy-mm-dd hh:mm:ss" 3rd column: only integer value. No decimal points 4th column: percentage values Please help. Thank you in
2008 Sep 11
5
How to obtain a sequence of dates consisting of only weekdays
Dear R-users, How do I obtain a sequence of dates consisting of only weekdays without the weekends in R? In S, I can do the following: timeSeq(from="12/17/2007", to="8/25/2008", by="weekdays") I tried using looking at timeSequence (fSeries package) and seq.Date (base package) but I do not know if I can specify "weekdays" rather than "day".
2008 Aug 26
1
bug in package chron (PR#12599)
Full_Name: Zeng, zhenxing Version: 2.7.1 (2008-06-23) OS: windows XP Submission from: (NULL) (158.182.1.30) Dear Author I have run into a trouble in using chron package The data frame: a date time_fut expiry_day bid ask trade_day 1 2004-09-01 09:45:00 2004-10 12860 12889 38 2 2004-09-01 09:45:01 2004-10 12885 12890 38 3 2004-09-01 09:45:04 2004-10 12883 12887
2010 Jan 26
2
Large dataset importing, columns merging and splitting
Dear All, I have a large data set that looks like this: CVX 20070201 9 30 51 73.25 81400 0 CVX 20070201 9 30 51 73.25 100 0 CVX 20070201 9 30 51 73.25 100 0 CVX 20070201 9 30 51 73.25 300 0 First, I would like to import it by merging column 3 4 and 5, since that is the timestamp. Then, I would like to aggregate the data by splitting them in bins of 5 minutes size, therefore from 93000 up to
2008 Aug 21
1
max and min with the indexes in a zoo object (or anything else that could solve the problem)
library(zoo) library(chron) t1 <- chron("1/1/2006", "00:00:00") t2 <- chron("1/31/2006", "23:45:00") deltat <- times("00:15:00") tt <- seq(t1, t2, by = times("00:15:00")) d <- sample(33:700, 2976, replace=TRUE) sin.zoo <- zoo(d,tt) #there are ninety six reading in a day d.max <- rollapply(sin.zoo, width=96, FUN=max)
2009 Jan 04
1
POSIXct and chron issues with tz
Dear All- I am trying to merge two data files - they have different date formats and different times zones. I need to match up the date/time of the datasets and then invoke a conditional statement, such as: if dataC$mph is >= 12 then keep dataM$co23 for the corresponding time/date stamp. snippets of data files: *dataC.txt* LST in mph Deg DegF DegF2 % volts Deg
2008 Sep 22
1
as.day() Function (zoo question)
I am was going to look at the as.yearmon function in the zoo package and write a as.day function to aggregate a time series of 96 observations per day into the mean for each day, but I don't know how to look at the code so that I can convert it into something I can use. On top of that I believe that it is probably an S3 method and I haven't quite gotten that far in my programming
2011 Jan 30
4
Extract time only from POSIXlt object
How can I extract only the time component from an POSIXlt object? For example if I try the following it still returns both the date and time... >as.POSIXlt(tr.date[1]) [1] "2010-10-18 21:46:53" >as.POSIXlt(tr.date[1],"%H:%M:%S") [1] "2010-10-18 21:46:53" round and trunc don't help... is there an "as.Time" equivalent to as.Date ? Thanks,