[R] error in recode.defalt ....object '.data' not found

John Fox jfox at mcmaster.ca
Thu Mar 31 17:10:42 CEST 2011


Dear Simon,

Your intention appears to be to call the recode() function in the car package. That function is not generic, and consequently has no default method, leading me to believe that you've called a recode() function in some other package.

I hope this helps,
 John

------------------------------------------------
John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/
	
On Thu, 31 Mar 2011 11:01:42 -0400
 Simon Kiss <sjkiss at gmail.com> wrote:
> Dear colleagues, working with the data frame below, trying to reverse two variables I the error message below.
> i searched through the help list but could not find any postings which could help me solve the situation. I tried attaching and detaching the data frame to no avail.
> Yours, Simon Kiss
> 
> *DATA FRAME
> 'data.frame':	1569 obs. of  9 variables:
>  $ equal     : num  3 4 3 2 3 4 2 3 2 2 ...
>  $ disc      : num  3 2 3 3 2 2 3 3 3 3 ...
>  $ family    : num  3 2 2 2 3 2 2 1 2 1 ...
>  $ special   : num  3 3 4 4 3 3 4 4 3 4 ...
>  $ immigrants: num  3 8 3 8 3 3 4 1 1 2 ...
>  $ wedlock   : num  3 3 3 3 3 2 2 8 2 3 ...
>  $ crime     : num  3 2 2 1 2 3 1 8 2 1 ...
>  $ breakdown : num  3 3 3 2 2 4 8 2 2 4 ...
>  $ nonwhites : num  2 4 3 3 2 2 3 4 3 3 ...
> 
> *RECODE
> social$nonwhites<-recode(social$nonwhites, "1=4; 2=3; 3=2; 4=1; 8=NA; -9=NA")
> 
> *ERROR
> Error in recode.default(social$nonwhites, "1=4; 2=3; 3=2; 4=1; 8=NA; -9=NA") : 
>   object '.data' not found
> 
> 
> *********************************
> Simon J. Kiss, PhD
> Assistant Professor, Wilfrid Laurier University
> 73 George Street
> Brantford, Ontario, Canada
> N3T 2C9
> Cell: +1 519 761 7606
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list