paul.hiemstra at knmi.nl
Wed Sep 21 14:49:23 CEST 2011
On 09/20/2011 10:28 PM, barb wrote:
> Hey everybody,
> i am using the rugarch-package and its great!
> I have a pretty easy problem, but i just dont get it, so thanks if you can
> help me.
> Normally i use:
> spec = ugarchspec()
> fit = ugarchfit(data = x[,1], spec = spec)
> names(fit at fit)
> I want to use my data now.
> I figured out how to load excel sheets.
> data <- read.csv2("Dataname.csv",header=T)
You do not need to attach 'data', this makes the columns of data
available as objects, which is generally not needed. Just refer to the
columns as data$column_name.
> x <- CGE[200:1]
> dx <- diff(log(x))
> How is my "Dataname" now safed?
> I cant use it as data(dataname) unfortunately.
The information in Dataname.csv is now in the object data, see
summary(data) or str(data). Btw, data is also an R function. Redefining
data is not regarded as good programming practice. Furthermore, the use
of the data function (as I've used it) is primarily to load datasets
which have been packaged along side R. As you've already loaded the
dataset using read.csv2, the data(dataname) command is not needed.
It seems to me that, no insult intended, you do not know what you are
doing. I would recommend you either read some more online introductory
material , buy some R books, do some kind of R course or find someone
that can tutor you. The kind of assistance you need is hard to give via
a mailing list. Again, I do not mean to be harsh (we where all R noobs
at some stage).
 see e.g. http://cran.r-project.org/manuals.html and
> Where is my mistake?
> Thank you
> View this message in context: http://r.789695.n4.nabble.com/Data-tp3828343p3828343.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Paul Hiemstra, Ph.D.
Global Climate Division
Royal Netherlands Meteorological Institute (KNMI)
Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
P.O. Box 201 | 3730 AE | De Bilt
tel: +31 30 2206 494
More information about the R-help