Displaying 1 result from an estimated 1 matches for "pcttest".
Did you mean:
pcitest
2011 Jul 22
1
Recoding Multiple Variables in a Data Frame in One Step
...d how to do this in base R, but I'd be
surprised if it's not possible.
I'm just trying to replace multiple columns at once in a data frame.
#load example data
data(api)
#this displays the three columns and eight rows i'd like to replace
apiclus1[ apiclus1$meals > 98 , c( "pcttest" , "api00" , "sch.wide" ) ]
#the goal is to replace pcttest with 100, api100 with NA, and sch.wide with
"Maybe"
#this doesn't work--
apiclus1[ apiclus1$meals > 98 , c( "pcttest" , "api00" , "sch.wide" ) ] <-
c( 100 , NA ,...