require(yaImpute)
data(iris)
# form some test data
refs=sample(rownames(iris),50)
x <- iris[,1:2] # Sepal.Length Sepal.Width
y <- iris[refs,3:4] # Petal.Length Petal.Width
# build yai objects using 2 methods
mal <- yai(x=x,y=y,method="mahalanobis")
gnn <- yai(x=x,y=y,method="gnn")
# compare the y variables
compare.yai(mal,gnn)Run the code above in your browser using DataLab