San Diego Data Science & R Users Group Message Board › How to run attached script in RStudio?

How to run attached script in RStudio?

kevin
KevinCroteau
La Jolla, CA
Post #: 1
I am trying to run the below script (beginning portion not full script) in RStudio for a 36 month univariate data set. I am completely new to both R and RStudio. I've tried multiple times to implement, set up, read the data for the instructions between the "hash" # marks.

I assigned the data set y<- in RStudio but get not results?

Can anyone help?

#x=read.table(“yourfile”)
y=ts(x,frequency=…)
[replace… by number of observations per year]

m=HoltWinters(y)#

Script (below):
HoltWinters <-function (y,

# smoothing parameters
alpha = NULL, # level
beta = NULL, # trend
gamma = NULL, # seasonal component
seasonal = c("additive", "multiplicative"),
start.periods = 2,

# starting values
Kevin D.
kldavenport
Seattle, WA
Post #: 2
Hey Kevin, I noticed the read.table line is commented out. Did you load your data into the R environment already? What format is the source data in?
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy