Fmat <- as.matrix(phytoclass::Fm)
S <- as.matrix(phytoclass::Sm)
S_weights <- as.numeric(phytoclass:::Bounded_weights(S))
place <- which(Fmat[, seq(ncol(Fmat) - 2)] > 0)
num.loops <- 2
# Run SAALS
result <- phytoclass:::SAALS(Fmat, NULL, NULL, place, S, S_weights, num.loops)
Run the code above in your browser using DataLab