Skip to content
Back to formatted view

Raw Message

Message-ID: <0424CEFC-4232-4C98-A733-7C3F77124389@gmail.com>
Date: 2013-07-28T08:43:43Z
From: Peter Dalgaard
Subject: Boxcox transformation error
In-Reply-To: <CAG0be2nmeU9h1mmX7psL48wqHserGHwmQvvTunccWQAOAXdt+w@mail.gmail.com>

On Jul 27, 2013, at 00:00 , Miller Ruiz wrote:

> Hello
> 
> I'm trying to run the script below for making a boxcox transformation of
> some variables contained on  an excel file, but i can't get it. I ever have
> the same message :
> error : $ operator is invalid for atomic vectors
> 
> One of the names of the variables is "Ec30" and it's the variable I put as
> example.
> 
> require(RODBC)
> require(fBasics)
> require(e1071)
> require(MASS)
> setwd("C:\\estadisticafijo")
> dir()
> temp=odbcConnectExcel("prueba35r")
> rs<-sqlFetch(temp,"Hoja1")
> close(temp)
> fix(rs)
> boxcox(rs$"Ec30")
> 
> Thaks a lot for your help.

The most obvious guess is that "rs" isn't what you think it should be, so how about showing us the result of str(rs)?

-pd

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com