ds <- data.set(
x = as.item(sample(c(1:3,9),100,replace=TRUE),
labels=c("One"=1,
"Two"=2,
"Three"=3,
"Missing"=9)))
df <- as.data.frame(ds)
ds <- within(ds,{
xr <- reversed(x)
})
codebook(ds)
df <- within(df,{
xr <- reversed(x)
})
codebook(df)
Run the code above in your browser using DataLab