## load the dataset
dataf = dataf.tecator()
## view the classes
unique(dataf$labels)
## access the 5th point of the 2nd object
dataf$dataf[[2]]$args[5]
dataf$dataf[[2]]$vals[5]
## plot the data
if (FALSE) {
labels = unlist(dataf$labels)
plot(dataf,
xlab="Wavelengths", ylab="Absorbances",
main=paste("Tecator: < 20 red (", sum(labels == "small"), "),",
" >= 20 blue (", sum(labels == "large"), ")", sep=""),
colors = c("blue", "red"))
}
Run the code above in your browser using DataLab