exvect <- as.item(rep(1:2,5))
labels(exvect) <- c(a=1,b=2)
codebook(exvect)
codebook(measurement_autolevel(exvect))
avect <- as.item(sample(1:3,16,replace=TRUE))
labels(avect) <- c(a=1,b=2,c=3)
bvect <- as.item(sample(1:4,16,replace=TRUE))
labels(bvect) <- c(A=1,B=2,C=3,D=4)
ds <- data.set(a=avect,b=bvect)
codebook(ds)
codebook(measurement_autolevel(ds))
codebook(measurement_autolevel(ds,except=c(a,b)))
codebook(measurement_autolevel(ds,only=a))
Run the code above in your browser using DataLab