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]]
_
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
properl
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 th
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)
linearModel3=lm(
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
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 + Re
(Just got back 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
Idga
:
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.o
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 <- function(HOUR,
# 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 = Umm
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 We
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 <- lm(t
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...
summary(
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 figu
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
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.
###
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
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 packa
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)
I am using the auto.arima package to do some basic forecasting based
on CPU usage. I now have found a calendar that has various activities
that partially control the computer's usage and want to factor that in
(They are effectively dummy variables indicating a particular type of
activity that week)
20 matches
Mail list logo