## load the example data
data(swapdiat)
data(swappH)
data(rlgh)
## process so common set of columns for training and test
## number of training set samples
n.train <- nrow(swapdiat)
## merge training and test set on columns
dat <- join(swapdiat, rlgh, verbose = TRUE)
## convert to proportions
dat <- dat / 100
## subset data back into training and test sets
swapdiat <- dat[1:n.train, ]
rlgh <- dat[(n.train+1):nrow(dat), ]
## fit the MAT model using the squared chord distance measure
swap.mat <- mat(swapdiat, swappH, method = "SQchord")
swap.mat
##
Screeplot(swap.mat)
Run the code above in your browser using DataLab