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

Simon Kiss sjkiss at gmail.com
Thu Mar 31 17:01:42 CEST 2011


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



More information about the R-help mailing list