# NOT RUN {
# example for dataset without missing values
data(data_test)
# class label must be factor
data_test[,ncol(data_test)]<-as.factor(data_test[,ncol(data_test)])
out=select.relief(data_test)
# example for dataset with missing values
# }
# NOT RUN {
data(leukemia_miss)
xdata=leukemia_miss
# class label must be factor
xdata[,ncol(xdata)]<-as.factor(xdata[,ncol(xdata)])
# nominal features must be factors
attrs.nominal=101
xdata[,attrs.nominal]<-as.factor(xdata[,attrs.nominal])
delThre=0.2
out=input_miss(xdata,"mean.value",attrs.nominal,delThre)
if(out$flag.miss)
{
xdata=out$data
}
out=select.relief(xdata)
# }
Run the code above in your browser using DataLab