[R] Table to List Transformation Scenario

2010-04-21 Thread Idgarad
: 1/1/10 00:00, 123 1/1/10 01:00, 123 1/1/10 02:00, 123 ... 1/1/10 23:00, 123 Any suggestions on how to get that kind of translation done in R? Idgarad -- Who is John Galt? [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] Basic Question (Real Basic)

2010-04-01 Thread Idgarad
from vacation.) I am just not wrapping my head around forecasting in R against transformed data (For stationary purposes). Total brain meltdown ( grilled cheese sounds good...) Anyone have a basic shell script I can look at for reference... not connecting dots today Idgarad -- Who is John

[R] Trouble Highlighting outliers on Time Series Plot

2010-01-26 Thread Idgarad
I am having trouble plotting outliers on time series. Give then following code: # find STL Outliers by weight and append sh2, use Robust # this should allow the initial outliers to be filtered # this section may be commented out.

[R] [Solved][Code Snippets] Dropping Empty Regressors

2010-01-12 Thread Idgarad
To make a long story short I was doing some in-sample testing in which some dynamically created regressors would end up either all true or all false based on the validation portion. In my case a new mainframe configuration (this is a crappy way to handle a level shift but I do what I can.) So here

[R] Getting a date out of an indice in a time series

2010-01-11 Thread Idgarad
I have a weekly data set imported via: tsSource=ts(sh1$I000,start=c(2004,1),freq=52) I am now getting to some 'spit and polish' but I realize something I can't wrap my head around. Given an outlier I find at say tsSource[54] ... how can get translate index 54 into the date\week. I mean I can

[R] Drop a part of an array\list\vector?

2010-01-07 Thread Idgarad
I did have a verbose description of why but rather then make everyone's eyes bleed with useless details I ask the following :) To make a long story short: How can I make newmcReg[[i]][PreIO308] go away in the following list... er vector... no wait array dataframe awww crap...

[R] lm() and factors appending

2009-12-30 Thread Idgarad
How for the love of god can I prevent the lm() function from padding on to my factor variables? I start out with 2 tables: Table1 123123 124351 ... 626773 Table2 Count,IS_DEAD,IS_BURNING 1231,T,F 4521,F,T ... 3321,T,T Everything looks fine when I import the data. then we get a oh_crap -

[R] Holiday Gift Perl Script for US Holiday Dummy Regressors

2009-12-08 Thread Idgarad
# BEGIN CODE ## #!/usr/bin/perl ## # # --start, -s = The date you would like to start generating regressors #--end, -e = When to stop generating holiday regressros # --scope, -c = D, W for Daily or Weekly respectively (e.g. Does this week have a particular holiday) # --file, -f =

[R] Opps Correct Version of Holiday Regressor Perl Script

2009-12-08 Thread Idgarad
Here is the correct version. The old version is the redirect only version of the script. ### BEGIN SCRIPT #!/usr/bin/perl ## # --start, -s = The date you would like to start generating regressors #--end, -e = When to stop generating holiday regressros # --scope, -c = D, W for Daily or

[R] Problem with predict() and factors

2009-12-03 Thread Idgarad
I am working on a script that takes numeric performance indicators and runs them against a series of regressors (dummy regressors, yes\no stuff via 0 and 1, e.g. Was is Christmas this week 0=no, 1=yes). The script is as follows (Written as a function): -- Begin Script -- doEnv -

[R] list of lm() results

2009-07-21 Thread Idgarad
How can I get the results of lm() into a list so I can loop through the results? e.g. myResults[1] - lm(...) myResults[2] - lm(...) myResults[3] - lm(...) ... myResults[15] - lm(...) myResults[16] - lm(...) so far every attempt I've tried doesn't work throwing a number of items to replace is

[R] Odd coefficent behavior

2009-07-21 Thread Idgarad
Why are my coefficients getting appended with a 1? It borks a match I do later against the original list that doesn't have the random 1 added to the end. linearModel[[1]] Call: lm(formula = modelSource ~ +UNITBUILD + UNITDB + ITBUILD + ITDB + UATBUILD + UATDB + HOGANCODE + RCF + ReleaseST1 +

[R] Spaces in a name

2009-07-15 Thread Idgarad
I am reading regressors from an excel file (I have no control over the file) and some of the element names have spaces: i.e. Small Bank Aquired but I have found that lm(SourceData ~ . - Small Bank Aquired, mcReg) doesn't work (mcReg = modelCurrentRegressors) As they are toggles I have ran them

[R] storing lm() results and other objects in a list

2009-07-15 Thread Idgarad
to clean up some code I would like to make a list of arbitrary length to store various objects for use in a loop sample code: BEGIN SAMPLE ## # You can see the need for a loop already linearModel1=lm(modelSource ~ .,mcReg) linearModel2=step(linearModel1)

[R] Proper Paste for Data Member

2009-07-14 Thread Idgarad
I imported a spreadsheet into a variable sh e.g. sh$, sh$, etc... doing the following: tsSource - ts(paste(sh$,NAMEVARIABLE,sep=) ... ) fails. The paste isn't evaluating properly. What is the proper way to concatenate a data source with a member name such that they evaluate properly.

[R] #INCLUDE

2009-07-08 Thread Idgarad
What is R's equivalent to a C-like #include to incorporate external files. I have a 2k line function that is generated and need to include it at runtime but not manage it as a package (as it changes hourly.) Any ideas? [[alternative HTML version deleted]]

[R] Help fCalendar holidayNYSE for Regressors

2008-06-17 Thread Idgarad
I am working with weekly time series data as in: tsData=ts(data,start=c(2004,1),freq=52) I have a table of regression variables that matchs called cReg (loaded from an xls sheet). I would like to append to the cReg table dummy variables for all the holidays as calculated from the fCalendar

[R] Automagic Outlier Dummy Variables

2008-05-27 Thread Idgarad
for the dummy variable. Idgarad P.S. Anyone know how to generate a holiday dummy series but aligned for weekly samples? (e.g. Week 52 has Christmas so get a column called Christmas setting ever week 52 entry to 1?) __ R-help@r-project.org mailing list https

[R] Programatic Method for Holiday Dummy Variables

2008-05-20 Thread Idgarad
I am working on a weekly analysis and would like to look into the effects of a holiday. As I only get weekly data how can I populate, automagically, a series of dummy variables that are aligned with my data. Snip - channel1 - odbcConnectExcel(D:/RSTATS/metrics.xls) sqlTables(channel1)