[R] automation of R? running an R script at a certain time each night?

2008-05-21 Thread Thomas Pujol
I am using R in a Windows environment. I store my data in a Microsoft SQL database that gets updated automatically nightly. Once my SQL db is updated, I wish to automatically run an R "script" Any tips on "good" ways to approach this task? Is there an easy way to "launch" an R script using t

Re: [R] tips to speed up sqlSave with MS SQL Server?

2008-04-28 Thread Thomas Pujol
s, but that is a different concept (and not yet wired up to sqlSave). On Mon, 28 Apr 2008, Thomas Pujol wrote: > I am using R2.6.0 on ?Windows Small Business Server 2003?. I apologize > if the answer to my question is available?I have searched but have not > found anyt

[R] tips to speed up sqlSave with MS SQL Server?

2008-04-28 Thread Thomas Pujol
I am using R2.6.0 on “Windows Small Business Server 2003”. I apologize if the answer to my question is available…I have searched but have not found anything that I thought helped me. I have a dataframe that contains ~4.5 million rows and 5 columns. (see memory and df details below). I a

[R] "preferred" version of Linux for R?

2008-04-08 Thread Thomas Pujol
Is there a recommended/preferred version of Linux for using with R? Is there one version of Linux that R-users prefer, and/or that works "better" with R? I am working with "large" datasets, and hope to take advantage of as much RAM as reasonable (8-32gb?). Thanks in advance!

[R] directory of R "consultants for hire"

2008-03-29 Thread Thomas Pujol
Does anyone know of a directory that lists consultants with expertise in R, as well as other statistical and computing skills, ideally with geographic location and other pertinent information? If one does not exist, might this be a good resource to create? -

[R] reducing RODBC odbcQuery memory use?

2008-03-02 Thread Thomas Pujol
1. Can I avoid having RODBC use so much memory (35 times the data size or more) making a data.frame & then .rda file via. sqlQuery/save? 2. If not, is there some more appropriate way from w/in R to pull large data sets (2-5GB) into .rda files from sql? [R] reducing RODBC odbcQuery memory use?

[R] "revision control software" for managing R-code?

2008-02-07 Thread Thomas Pujol
Does anyone use "revision control software" to manage their R-code? Any suggestions? Ideally, I'm looking for a, effective yet easy to implement/maintain package. http://en.wikipedia.org/wiki/Revision_control http://en.wikipedia.org/wiki/Comparison_of_revision_control_software -

[R] advice requested re: building "good" system (R, SQL db) for handling large datasets

2008-02-05 Thread Thomas Pujol
R-community, Sometime during the next 12-months, I plan on configuring a new computer system on which I will primarily run "R" and a SQL database (Microsoft SQL Server, MySQL, Oracle, etc). My primary goal is to "optimize" the system for R, and for passing data to and from R and the database.

[R] using sub with "wildcards", e.g. sub("\\*..", "", "test.a..34")

2008-01-08 Thread Thomas Pujol
I have a text string "test.a..34" I wish to extract the text that comes after ".." (e.g. "34"), and the text that comes before ".." (e.g. "test.a"). What is a good way to do this? Also, can you help me understand how to use "wildcards" such as "*" with sub, etc? #This seems

[R] retaining "POSIXct" formatting when using apply(muff, FUN=MAX) on POSIXct dataframe?

2008-01-08 Thread Thomas Pujol
How do I retain "POSIXct" formatting when using apply, with FUN=max? #example: mydata <- rep(Sys.time(), 10) mydf <- data.frame(matrix(data=mydata, nrow=2, ncol=length(mydata) ) ) for(i in seq(mydf))class(mydf[[i]]) <- class(mydata) str(mydf) maxdates <- apply(mydf,2,max,na.rm=T) str(maxdat

[R] retaining formatting when converting a vector to a matrix/data.frame?

2008-01-03 Thread Thomas Pujol
Please see example code below. I have a vector ("mydata") of length 10. "mydata" can have various formats (e.g. numeric, text, POSIXct, etc) I use the matrix and data.frame functions to convert "mydata" to a dataframe ("mydf") of 2 columns and 5 rows. What is a "good" way to ensure

[R] way to check if the evaluation of an expression returns an error?

2007-12-14 Thread Thomas Pujol
Is there a recommended or "good" way to check if the evaluation of an expression returns an error? e.g. var(NA) I wish var(NA) to return NA or "err", or some other value, even a text-string, but not an error message. I am using a loop to load many samples of data and to pe

[R] RODBC, optimizing memory, "Error: cannot allocate vector of size 522 Kb".

2007-12-13 Thread Thomas Pujol
I am using RODBC and "odbcConnect". I have successfully used odbcConnect to extract "modest" amounts of data from SQL. For convenience, (and maybe speed?) I wish, if possible, to extract larger amounts of data in a single query. (I am running R2.6.0 under a machine running Windows Small B

Re: [R] using "eval(parse(text)) " , gsub(pattern, replacement, x) , to process "code" within a loop/custom function

2007-12-07 Thread Thomas Pujol
ot;processes" I might want to perform on each sample on any given day. So instead of always re-writing the same loop, I want to write a function that takes as its input the "process", and then goes and runs it on each sample. Thanks From: Emmanuel Charpentier Da

[R] using "eval(parse(text)) " , gsub(pattern, replacement, x) , to process "code" within a loop/custom function

2007-12-06 Thread Thomas Pujol
R-help users, Thanks in advance for any assistance ... I truly appreciate your expertise. I searched help and could not figure this out, and think you can probably offer some helpful tips. I apologize if I missed something, which I'm sure I probably did. I have data for many "samples".

[R] beginner's tutorial, books, etc re: time-series analysis, ARMA/ARIMA models...

2007-10-20 Thread Thomas Pujol
Can anyone point me towards a beginner's tutorial, books, etc for someone that on time-series analysis, ARMA/ARIMA models, etc? keywords: time-series, autoregression, autoregressive, tutorial, beginner, ARMA, ARIMA __ [[alternative HT

[R] converting numbers in "YYYYMM" format to last calendar day and last exchange trading day of the month

2007-09-27 Thread Thomas Pujol
I have a vector that contains month and year in the format MM (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