R/Domains.r

Defines functions Domains

Documented in Domains

#' @export

Domains<-function(y){
y<-as.factor(y)
d<-as.double(y)
n<-length(d)
Dom<-matrix(0,n,max(d))
colnames(Dom)<-levels(y)
for(k in 1: max(d)){
Dom[,k]<-as.double(d==k)}
Dom
}

Try the TeachingSampling package in your browser

Any scripts or data that you put into this service are public.

TeachingSampling documentation built on April 22, 2020, 1:05 a.m.