Re: [R] using its to import time series data with uneven dates

2005-07-12 Thread Whit Armstrong
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]

Re: [R] Is it possible to create highly customized report in *.xlsformat by using R/S+?

2005-07-20 Thread Whit Armstrong
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

Re: [R] Is it possible to create highly customized report in *.xlsformat by using R/S+?

2005-07-20 Thread Whit Armstrong
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

Re: [R] again, a question between R and C++

2005-07-21 Thread Whit Armstrong
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

Re: [R] Irregular Time Series: zoo its: Pros Cons

2005-08-25 Thread Whit Armstrong
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

Re: [R] Testing if all elements are equal in a vector/matrix

2005-08-29 Thread Whit Armstrong
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

Re: [R] Linux Standalone Server Suggestions for R

2005-08-31 Thread Whit Armstrong
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

[R] scoping rules

2004-09-09 Thread Whit Armstrong
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

RE: [R] Excel *.xls files, RODBC

2004-12-04 Thread Whit Armstrong
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

RE: [R] faster row by row data frame processing

2004-12-20 Thread Whit Armstrong
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,

RE: [R] Replacing all NA values in a matrix

2005-01-05 Thread Whit Armstrong
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

[R] apply a function to a rolling subset of a vector

2005-03-02 Thread Whit Armstrong
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.

RE: [R] apply a function to a rolling subset of a vector

2005-03-02 Thread Whit Armstrong
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

Re: [R] Aggregating an its series

2006-04-07 Thread Whit Armstrong
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

Re: [R] (IT WAS) Aggregating an its series

2006-04-09 Thread Whit Armstrong
*** 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

RE: [R] Fwd: strptime() problem?

2004-08-17 Thread Whit Armstrong
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

RE: [R] Testing Performance of R on AIX

2004-08-25 Thread Whit Armstrong
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

[R] help with eval

2005-05-13 Thread Whit Armstrong
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

[R] Problems with addition in big POSIX dates

2003-08-14 Thread Whit Armstrong
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

[R] Calling primitive functions from C code

2003-12-31 Thread Whit Armstrong
/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

[R] Repeated regressions

2004-01-29 Thread Whit Armstrong
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

RE: [R] convert *.xls to text

2004-03-30 Thread Whit Armstrong
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

RE: [R] Aggregating frequency of irregular time series

2004-03-30 Thread Whit Armstrong
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)

RE: [R] Aggregating frequency of irregular time series

2004-03-31 Thread Whit Armstrong
] 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

Re: [R] its dates masked by chron

2005-10-27 Thread Whit Armstrong
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

Re: [R] given a mid-month date, get the month-end date

2005-12-19 Thread Whit Armstrong
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