Incidence Matrix of Levels within a Factor
Incidence matrix of levels within a factor
at.level(x, level)
x |
factor |
level |
factor level |
incidence matrix for level in x
Jarrod Hadfield j.hadfield@ed.ac.uk
fac<-gl(3,10,30, labels=letters[1:3]) x<-rnorm(30) model.matrix(~at.level(fac,"b"):x)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.