Re: [R] predicting without a model

2010-05-11 Thread Rob Forler
I forgot to reply to all: This is what I sent earlier to him: """ I would look at the data. You don't really have any information other than what appears to be the weekly passage. I would look to see if there is any relationship between the current value of passage and previous values of passage.

Re: [R] Code is too slow: mean-centering variables in a data framebysubgroup

2010-04-07 Thread Rob Forler
Leave it up to Tom to solve things wickedly fast :) Just as an fyi Dimitri, Tom is one of the developers of data.table. -Rob On Wed, Apr 7, 2010 at 2:51 PM, Dimitri Liakhovitski wrote: > Wow, thank you, Tom! > > On Wed, Apr 7, 2010 at 3:46 PM, Tom Short wrote: > > Here's how I would have done

Re: [R] dataframe in loop

2010-03-30 Thread Rob Forler
Wait so basically you want to merge the two data sets on some key value? On Tue, Mar 30, 2010 at 12:30 PM, Muting Zhang wrote: > hello all: > > I would like to thank those who helped me out of the string problem..but > now I got another problem. > I used R to query from SQL and got a list of cr

Re: [R] Reg GARCH+ARIMA

2010-03-18 Thread Rob Forler
st > results.Is there any work around any packages avaiable where we can use test > data for prediction like we have in Neural Nets package. > > > Regards, > Raghav > > > On Wed, Mar 17, 2010 at 8:40 PM, Rob Forler wrote: > >> Hi, >> >> I can help, bu

Re: [R] rbind, data.frame, classes

2010-03-15 Thread Rob Forler
a hah, that works :) simple but sweet, thanks, Rob On Mon, Mar 15, 2010 at 1:59 PM, Henrique Dallazuanna wrote: > Try this: > > do.call(rbind, lapply(list(list1, list2), as.data.frame)) > > On Mon, Mar 15, 2010 at 3:42 PM, Rob Forler wrote: > > Hi, > > > > Th

[R] rbind, data.frame, classes

2010-03-15 Thread Rob Forler
Hi, This has bugged me for a bit. First question is how to keep classes with rbind, and second question is how to properly return vecotrs instead of lists after turning an rbind of lists into a data.frame list1=list(a=2, b=as.Date("20090102", format="%Y%m%d")) list2=list(a=2, b=as.Date("20090102"

[R] confused by classes and methods.

2010-03-08 Thread Rob Forler
Hello, I have a simple class that looks like: setClass("statisticInfo", representation( max = "numeric", min = "numeric", beg = "numeric", current = "numeric", avg = "numeric",

Re: [R] Hi

2010-03-04 Thread Rob Forler
a quick google of "fminsearch in R" resulted in this http://www.google.com/search?q=fminsearch+in+R&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a take a look. there appears to be a function called optim that you can look at http://sekhon.berkeley.edu/stats/html/optim.htm

Re: [R] Three most useful R package

2010-03-03 Thread Rob Forler
Sorry to clear up the reasons why: RODBC because it allows me to seamlessly interact with all the databases at the place I work. And data.table because it does aggregation about 50x times faster than plyr (which I used to use a lot). Thanks, Rob On Wed, Mar 3, 2010 at 7:07 AM, Rob Forler

Re: [R] Three most useful R package

2010-03-03 Thread Rob Forler
RODBC data.table On Wed, Mar 3, 2010 at 3:29 AM, Tony B wrote: > I only really need the base packages, but otherwise I suppose the most > useful for me are: > > (1) RCurl > (2) plyr > (3) XML > > On 2 Mar, 20:13, Ralf B wrote: > > Hi R-fans, > > > > I would like put out a question to all R user

Re: [R] data.table evaluating columns

2010-03-03 Thread Rob Forler
maintainer first, but you also have to say that you have as > well, and perhaps how long ago too would be helpful. For r-forge projects > I > usually send any question to everyone on the project (easy to find) or if > they have a list then to that. > > HTH > Matthew > > >

[R] data.table evaluating columns

2010-03-02 Thread Rob Forler
Hi everyone, I have the following code that works in data frames taht I would like tow ork in data.tables . However, I'm not really sure how to go about it. I basically have the following names = c("data1", "data2") frame = data.frame(list(key1=as.integer(c(1,2,3,4,5,6)), key2=as.integer(c(1,2,3

Re: [R] dramatic speed difference in lapply

2010-02-26 Thread Rob Forler
> 3 221 221 > 4 134 134 > 5 253 253 > 6 194 194 > > > head(ret2) > D Fid V1 > [1,] 32000 1 228 > [2,] 32000 2 209 > [3,] 32000 3 182 > [4,] 32000 4 180 > [5,] 32000 5 181 > [6,] 32000 6 222 > > > head(ret3) > D Fi

[R] dramatic speed difference in lapply

2010-02-26 Thread Rob Forler
So I have a function that does lapply's for me based on dimension. Currently only works for length(pivotColumns)=2 because I haven't fixed the rbinds. I have two versions. One runs WAYYY faster than the other. And I'm not sure why. Fast Version: fedb.ddplyWrapper2Fast <- function(data, pivotColum

Re: [R] Odp: How to read percentage and currency data?

2010-02-24 Thread Rob Forler
This seems like a case where you should have a column that is "Currency" or "CurrencyKey". You can then do proper sql like queries on the data and convert into a base currency or something to do column wise operations. A column of data should be somehow "consistent" within some view. Currently yo

Re: [R] RODBC connection name

2010-02-24 Thread Rob Forler
opyright (C) 1997-2008 Mark Russinovich" > [4] "Sysinternals - www.sysinternals.com" > [5] "" > [6] "Rgui.exe pid: 7128188: C:\\tmp2\\test.xls" > > > On Wed, Feb 24, 2010 at 9:48 AM, Rob Forler wrote: > > Hello all, > > &g

[R] RODBC connection name

2010-02-24 Thread Rob Forler
Hello all, I've scoured the RODBC.pdf, but there appears to be no way to set the name of the RODBC connection. This is useful for the DBA's to know that some processes should only run for so long and can be automatically killed. But currently the name is just R. so they aren't sure if the connecti

Re: [R] relative file path

2010-02-22 Thread Rob Forler
oun...@r-project.org] On Behalf Of Duncan Murdoch > > Sent: Monday, February 22, 2010 1:49 PM > > To: Rob Forler > > Cc: r-help@r-project.org > > Subject: Re: [R] relative file path > > > > On 22/02/2010 3:44 PM, Rob Forler wrote: > > > Hello, > &g

[R] relative file path

2010-02-22 Thread Rob Forler
Hello, Is there a way to find where a script is located within a script? getwd() doesn't do what I want because it depends on where R was called from. I want something like source("randomFile") and within randomFile there is a function called whereAmI() which returns c:\blah\blah2\randomFile.R In

Re: [R] RODBC missing values in integer columns

2010-02-16 Thread Rob Forler
It turns out that in the sqlQuery I must set rows_at_time =0 to get rid of this problem. Does anyone have any idea why this might be? On Tue, Feb 16, 2010 at 12:52 PM, Rob Forler wrote: > some more info > > t(t(odbcGetInfo(connection))) > [,1] > DBMS_Name

Re: [R] RODBC missing values in integer columns

2010-02-16 Thread Rob Forler
r_Ver "09.00.0001" ODBC_Ver "03.52.0000" Server_Name "dbname" On Tue, Feb 16, 2010 at 11:39 AM, Rob Forler wrote: > Hello, > > We are having some strange issues with RODBC related to integer columns. > Whenever we do a sql query the dat

[R] RODBC missing values in integer columns

2010-02-16 Thread Rob Forler
Hello, We are having some strange issues with RODBC related to integer columns. Whenever we do a sql query the data in a integer column is 150 actual data points then 150 0's then 150 actual data points then 150 0's. However, our database actually has numbers where the 0's are filled in. Furthermo