You would probably do better to read in your data and reformat the
dates.
What date format is 2000.18790? The Its package uses POSIXct dates and
readcsvIts expects the formats to be %Y-%m-%d unless you've changed
the default format.
-Original Message-
From: [EMAIL PROTECTED]
I have a package which I use to create excel files from R.
I have not been able to produce a configure script general enough for me
to post it to cran, but I will send it to you if you like.
I use it for production jobs on our linux servers. You may have to
tinker a bit to get it to compile on
PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dirk Eddelbuettel
Sent: Wednesday, July 20, 2005 11:53 AM
To: r-help@stat.math.ethz.ch
Subject: Re: [R]Is it possible to create highly customized report in
*.xlsformat by using R/S+?
Whit Armstrong whit at twinfieldscapital.com writes:
I have a package
Jordi,
The place to ask this question is probably the r-devel list; it's a
little too heavy for r-help.
This is fairly easy to do using the .Call interface.
Have a look at lapply2 in the Writing R Extensions manual.
http://cran.r-project.org/doc/manuals/R-exts.html#Evaluating-R-expressio
I am the maintainer of its, but not it's original author.
One of the main strengths of its is that it uses POSIXct dates.
Zoo has the flexibility of using almost any date format, but I don't
know if the other date formats can store hour, min, sec data.
You might want to do a little exploring
or perhaps
length(unique(x))==1
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Patrick Burns
Sent: Monday, August 29, 2005 5:22 PM
To: [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Testing if all elements are equal in a vector/matrix
you can test out a live PPC 64 bit system here:
http://www.openpowerproject.org/us/signup.php
I have successfully built R in my home dir and compiled a few packages for it.
Here are the machines available:
Universität AugsburgPeking University
Server
Can someone help me with this simple example?
sq - function() {
y - x^2
y
}
myfunc - function() {
x - 10
sq()
}
myfunc()
executing the above in R yields:
myfunc()
Error in sq() : Object x not found
I understand that R's scoping rules cause it to look for x in
There is another way to read and write excel files using jakarta POI.
Hopefully, I'll have a package available in a week or so. I have a working
example of writing a matrix from R to excel, but I haven't finished the read
excel portion of the code. If anyone wants to give it a spin, contact me
Something like this perhaps?
x - matrix(rnorm(1000),ncol=10)
y - t(apply(abs(x),1,rank,ties.method=first))
thresh - 8
x[ythresh] - sign(x[ythresh])
x[y=thresh] - 0
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of bogdan romocea
Sent: Monday,
x - matrix(rnorm(100),ncol=10)
x[x0] - NA
x[is.na(x)] - 1000
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
michael watson (IAH-C)
Sent: Wednesday, January 05, 2005 9:26 AM
To: R-help@stat.math.ethz.ch
Subject: [R] Replacing all NA values in a
Does anyone know an easy way to calculate the rolling 20 period average
or sum of a vector?
For instance:
x - rnorm(1000)
y - apply.subset(x,20,fun=sum)
The first element of y would contain the sum of elements 1 to 20, the
second element of y
would contain the sum of elements 2:21, and so on.
Thanks, everyone, for all the suggestions.
The rollFun turs out to be just what I needed.
Cheers,
Whit
-Original Message-
From: Kjetil Brinchmann Halvorsen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 02, 2005 5:45 PM
To: Whit Armstrong
Cc: r-help@stat.math.ethz.ch
Subject: Re
aggregate(base,by=list(as.factor(format(dates(base),%Y%m%d))),mean,na.
rm=T)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Vittorio
Sent: Friday, April 07, 2006 11:38 AM
To: r-help@stat.math.ethz.ch
Subject: [R] Aggregating an its series
I'm using a
***
Now - just to go deeper into the **same subject** on which I'm really supposed
to work very soon - if I want to aggregate by date only data, say, before noon
(12.00.00) what should I do?
Ciao
Vittorio
Alle 16:13, venerdì 07 aprile 2006, Whit Armstrong ha scritto:
aggregate(base,by=list
Javier,
I recently had a problem with dates. This example might shed some light on
your problem.
x - ISOdate(rep(2000,2),rep(3,2),rep(26,2),hour=0)
x
[1] 2000-03-26 GMT 2000-03-26 GMT
unclass(x)
[1] 954028800 954028800
attr(,tzone)
[1] GMT
When one creates a date with ISOdate, the
Acovea is a nice tool for testing gcc optimization options, but you would
probably have to do a lot of work to build tests for R.
http://www.coyotegulch.com/products/acovea/index.html
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Liao, Kexiao
I've been looking at the help page for eval for a while, but I can't
make sense of why this example does not work.
show.a - function() {
a
}
init.env - function() {
a - 200
environment()
}
my.env - init.env()
ls(envir=my.env)
# returns this:
# ls(envir=my.env)
# [1] a
# but this does
change.
Am I missing something?
Thanks,
Whit Armstrong
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major1
minor6.2
year 2003
month01
day 10
/doc/manuals/R-exts.pdf
http://cran.r-project.org/doc/manuals/R-exts.pdf
How does one create call, op and rho to be passed into do_subset_dflt?
Any advice on constructing a successful call to do_subset_dflt from C would
be greatly appreciated.
Thanks,
Whit Armstrong
[[alternative HTML
for fixed windows and expanding windows?
Thanks,
Whit Armstrong
[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R
Has anyone looked into using the Jakarta POI to save R data directly to xls
format?
http://jakarta.apache.org/poi/index.html
One of the advantages of POI over the DCOM interface is that one could use
unix/linux platforms to generate excel files / reports.
I would be interested in collaborating
This function will probably work for you if your dates are in the format
mmdd. Use it to convert the series from daily to monthly, then use a 1
period difference to calc the returns of the series.
Feel free to contact me off list with any questions.
Dates - function(x) rownames(x)
] Aggregating frequency of irregular time series
I am not 100% sure I understand what you are trying to accomplish but if its
to calculate the highest date in seriesDates for each value of
seriesYM then you can do it without a loop like this (untested):
tapply( seriesDates, seriesYM, max )
Whit
Uwe,
It was unclear whether you were referring to chron or its as being
unmaintained.
I still maintain its, and I'm actually releasing a new version tonight
since Kurt has pointed out that the current version is failing package
checking.
It seems that both its and chron use namespaces. I
Or add a month, then subtract a day:
Ndays - function(posix.ct.dates,days) {
# one day = 60*60*24 = 86400 seconds
ans - as.POSIXct(posix.ct.dates) + 86400*days
# we only have a problem if the date went from
# DST to ST or from ST to DST
ans + (as.POSIXlt(posix.ct.dates)$isdst
26 matches
Mail list logo