Displaying 13 results from an estimated 13 matches for "yyyymm".
2007 May 10
3
Getting the last day of the month.
Hi,
Given a date, how do I get the last date of that month? I have
data in the form YYYYMM, that I've read as a date using
> x$Date <-
as.Date(ISOdate(substr(x$YearEnd,1,4),substr(x$YearEnd,5,6),1))
But this gives the first day of the month. To get the last day of the
month, I tried
> as.Date(as.yearmon(x$Date,frac=0))
But I don't get the last day of the month here....
2012 Mar 14
3
Help: problem converting character to numeric
Dear R experts,
I have a dataframe imported from a csv file (with read.csv).
Here is an example:
yyyymm<- c("19860228", "19860331","19860430","19860531")
id<-c("10000","10000","10000","10000")
re<- c("C","0.25", "0.98", "1.34")
mret<-data.frame(yyyymm, id, re)
mret<...
2007 Sep 27
1
converting numbers in "YYYYMM" format to last calendar day and last exchange trading day of the month
I have a vector that contains month and year in the format YYYYMM (e.g.“200701”, “200702”)
I wish to do to things:
1. I need to convert to a date that is the last calendar day of each month.
2. I need to convert this to a date that is the last U.S. stock-exchange trading day of each month.
Any advice is appreciated,
mymonths <-...
2010 Jan 22
2
Question on Merge/Lookup
I need to merge three datasets and don't know how. If I were using SQL, I
would use df3, look up the characteristics of each date in df1 and the value
for each observation in df2.
df1 - unique list of Dates and characteristics of those dates
Date, YYYYMM, YYYYWW, DOW
df2 - the raw data
Date, Place, Value
df3 - all posibile combinations of Date + Place (via
expand.grid(unique(df2$Date),unique(df2$Place))
Date, Place
I need to end up with:
Date, YYYYMM, YYYYWW, DOW, PLace, Value (plug 0 if combo doesn't exist in
raw data).
Appreciate any h...
2010 Feb 15
4
Separating columns, and sorting by rows
Dear anyone who knows more about R than me (so everyone). I have been bashing
my head on the keyboard all day trying to do something with my table.
I have some data, like so:
yyyy-mm Rainfall(mm)
1 1977-02 17.4
2 1977-03 34.0
3 1977-04 26.2
4 1977-05 42.6
5 1977-06 58.6
6 1977-07 23.2
7 1977-08 26.8
8 1977-09 48.4
9
2012 Nov 09
2
Creating yyyymm regexp strings on the fly for aggregation.
Folks,
This question is somewhat related to a previous posting of mine.
I just can't seem to create a generic solution.
Here is a function that I found searching around the internet:
splitIt <- function(x, n) {split(x, sort(rank(x) %% n))}
I use it like so:
> splitIt(1:12, 2)
$`0`
[1] 1 2 3 4 5 6
$`1`
[1] 7 8 9 10 11 12
Or
> splitIt(1:12, 4)
$`0`
[1] 1 2 3
$`1`
[1] 4 5 6
2012 Dec 15
2
troubles reading a text file
Dear R experts,
For quite some time I have been trying to solve a mistery of reading a seemingly trouble-free text file. The data is temperature reconstruction arranged as a huge grid, preceded by seven "header lines" (which you see better if file is opened in Firefox or Chrome).
This is the data (gridded temperature reconstruction)
2003 May 18
1
TS data frames
...t) and print(tsdataset) show that this operation did
what I intended.
* Alas, tsdataset$x no longer works. how do I specify data series
inside tsdataset now?
* Is there a time-series equivalent of read.table(), preferably allowing
me to specify that the data column is the appropriate data in yyyymm format?
* For arguments sake, let's assume I want to do something with every
variable in my data set. for example, I want to convert every single
data series into a time series. "for (a in names(dataset)) a<-ts(a)" of
course does not do what I want, because the destination is...
2011 Oct 31
1
googleVis motionchart - slow with Date class
...y slow to load and it appears when pressing play that the date field fills in each day of the year.
Trying to go back and fourth between the line plot and the scatter plot will crash the browser.
Is there a better way to express monthly data? I have tried converting it to a numeric in the form of yyyymmdd or yyyymm, but this didn't work?
I am also wondering. is the best place to post a question about googleVis? I notice threads on stackoverflow and other places.
Thanks,
Matt
[[alternative HTML version deleted]]
2011 Aug 26
1
performance with 100k messages per folder
...re.
The configuration is more or less stock. Postfix receives then delivers
to Dovecot. IMAP with mbox. Only one user account, but shared by several
people via webmail (Roundcube webmail in Apache on the same machine). No
other MUAs. 100k new messages per month, inbox is rotated monthly into a
YYYYMM folder by a cron job. Only one monthly folder so far. Messages
are never deleted (but I may start deleting old folders a year or two
from now). This is mostly for reading, with occasional messages being
forwarded.
The email was pretty sluggish when logging in to the webmail interface.
I asked...
2010 Oct 14
1
Permission issues
I have a few machines running on a domain mixed windows platforms as low as windows 95 when I run my script it was working my server is fedora of late some of my xp clients keep giving me permissions error 13,1 and 23 and my windows 7 clients also. I running cwrsync on the clients the newest stable release from sourceforge.net where do I send my script so you could analyze.
Sent from my
2003 Apr 27
2
Basic date time arithmetics operations
Hello,
For basic date time arithmetics operations, AFAK, there're
actually the function difftime() and the (dt + num) operations.
I'm wondering if other basic operations exist, like
add(dt, num, unit) where unit would be "y", "q", "m", etc.
Also for the function seq.dates (or seq.POSIXt), the
case for by="months" would be more useful if it
2003 Apr 27
2
Basic date time arithmetics operations
Hello,
For basic date time arithmetics operations, AFAK, there're
actually the function difftime() and the (dt + num) operations.
I'm wondering if other basic operations exist, like
add(dt, num, unit) where unit would be "y", "q", "m", etc.
Also for the function seq.dates (or seq.POSIXt), the
case for by="months" would be more useful if it