similar to: Generating Sequence of Dates

Displaying 20 results from an estimated 60000 matches similar to: "Generating Sequence of Dates"

2009 Oct 28
1
Generating sequence of dates
Hello All: I have the following question # instantiate a date current = as.Date("2009/10/25") #generate a sequence of dates in the future future_dates = seq(current,by='1 week',length=53) Question: How to generate a sequence of past dates starting one week in the past relative to the current date. Obviously, what I wrote below is not correct. I think I can write a for loop and
2012 Nov 30
2
Generating sequences of dates
Hello, I have the starting date in UNIX_TIME LONG number (number of milliseconds since 1970 jan 1st). Is there a way to generete the sequence of dates with monthly interval in POSIXct format like 2000-01-01 2000-02-01 2000-03-01 etc Thanks [[alternative HTML version deleted]]
2008 Feb 04
1
Processing dates and generating sequences of dates
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO Dear List, Say I have the following sequence of dates [*]: start <- as.Date("2005-01-05", format = "%Y-%d-%m") end <- as.Date("2007-10-07", format = "%Y-%d-%m") my.dates <- seq(start, end, by = "days") What I would like to generate is a sequence of dates, by month that goes from the first
2010 Jul 24
2
How to generate a sequence of dates without hardcoding the year
Hi: I have a dataframe named 'spring' and I am trying to add a new variable named 'IdDate' This line of code works fine: spring$idDate <- seq(as.Date("2008-07-01"),as.Date("2009-06-30"),by="week") But I don't want to hardcode the year because it will be used again the following year Is it possible to just generate dates with the month and
2012 Feb 22
4
Week number from a date
Hi My data looks like this startDate="2008-06-01" dateRange =c( "2008-10-01","2008-12-01") Is there any method to find the week number from the startDate range ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/Week-number-from-a-date-tp4410223p4410223.html Sent from the R help mailing list archive at Nabble.com.
2011 Nov 17
2
Adding a year to existing date
Hi I need to add an year to and date field in the dataframe. Please help me X Date 1 2008-01-01 2 2008-02-01 3 2003-03-01 Thanks in advance -- View this message in context: http://r.789695.n4.nabble.com/Adding-a-year-to-existing-date-tp4078930p4078930.html Sent from the R help mailing list archive at Nabble.com.
2013 Mar 09
1
Unexpected behavior looping through sequence of dates
I understand that the two following loops should produce the exact same output. However, they do not. It appears that looping directly through the sequence of Date objects somehow makes them be coerced to numeric: > date1 = "20130301" > date2 = "20130302" > > d1 = as.Date(date1, format="%Y%m%d", tz="GMT") > d2 = as.Date(date2,
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".
2010 Mar 19
2
Sequence of ordered variable to add as column
Hello all, As an example, consider the following dataframe > df<-data.frame(id=c("b","b","a","a","a"),ord=c(2,1,1,3,2)) > dates<-as.Date(c("02/27/92", "02/27/92", "01/14/92", "02/28/92", "02/01/92"),"%m/%d/%y") > df$dates<-dates which was ordered with >
2006 Feb 06
1
Help In Sequence of Dates
Dear R-users, First of all, I'm sorry if this is a simple question. I want a daily date series which will be a sequence. E.g. starting from 07/03/1962 to 12/03/1997. Thanks in advance. I want to paste this date series with the data series I have. Thanks & Regards, Sumanta Basak.
2001 Jan 11
3
Reformatting dates using chron
Hello All: I am trying to generate a sequence of dates using library(chron). Using the following code, I got most of what I want, dts <- seq.dates("01/02/1998", "01/10/2001", by="day") dts <- dts[!is.weekend(dts)] a sequence of weekdays only (no weekend dates), with first observation appearing as 01/02/98 and the last 01/10/01. But I would
2011 Nov 30
3
how to call a function for each row
Hi I have a data-frame which look like this X1 X2 X3 1 3 5 2 4 6 3 6 1 I want to apply a formula Y=6*X1 + 7*X2 + 8*X3 for every row Thanks in Advance -- View this message in context: http://r.789695.n4.nabble.com/how-to-call-a-function-for-each-row-tp4122906p4122906.html Sent from the R help mailing list archive at Nabble.com.
2012 Nov 26
3
Help in splitting the records
Hi I have set of records seperated by a separator say "$$$" i want to get the values in a dataframe. eq qwer$$12$$qwre ewrtr$7789$ewwe I want the output as\ V1 V2 V3 qwer 12 qwre ewrtr 7789 ewwwe Please help me ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/Help-in-splitting-the-records-tp4650827.html Sent from
2010 Jun 30
1
seq.dates in reverse?
Pardon the barrage of time series related questions, but another issue I'm trying to solve is how to determine a sequence of dates a la seq.dates() except going BACKWARDS in time, e.g. if seq.dates() allowed for the "to" variables to be set alone, rather than the from=. Ultimately, I'd like to have a set of dates preceding a given date in predefined intervals (the same ones
2011 Nov 16
3
changing date format in a dataframe
Hi I have a data frame and i need to change the date format in it. my dataframe X Date 1 1/1/2009 2 2/1/2009 3 3/1/2009 I need to change it to 2009-01-01 -- View this message in context: http://r.789695.n4.nabble.com/changing-date-format-in-a-dataframe-tp4076411p4076411.html Sent from the R help mailing list archive at Nabble.com.
2012 Jul 03
2
read the date format
hi I have a data like thursday, November 20,2012. I'm not able to convert into data format in R Can anyone please help ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/read-the-date-format-tp4635245.html Sent from the R help mailing list archive at Nabble.com.
2012 Aug 03
1
how to get a date variable from a dataset
Hi I have a find the class of each variable of the data set which is given as input. I can able to find the string and the numeric variable. Not able to find if the variable is date or not Can any one help me. ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/how-to-get-a-date-variable-from-a-dataset-tp4639038.html Sent from the R help
2012 Jan 31
1
Help required in using apply instead of for loop
Hi I have a function y= x^2 min =10 max=20 increment=0.1 I want to find the value of y for the value of x between min and max by step increment. how to get the values using apply function instead of for loop ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/Help-required-in-using-apply-instead-of-for-loop-tp4344350p4344350.html Sent from the
2004 Nov 04
1
problems with seq.dates
There seem to be a bug in the seq.dates function in the chron package for R 2.0. Please see below: when the specified frequency is "months", seq.dates does not return the end of the specified interval all the time: > seq.dates(from = "05/31/04", to = "12/31/04", by = "months") [1] 05/31/04 06/30/04 07/31/04 08/31/04 09/30/04 10/31/04 11/30/04 Ciprian
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