sigmoid <- function(prop, k, m, rev=FALSE, ...) { x = as.numeric(rownames(prop)) if(!rev) plot(x, prop[,2], ...) else plot(x, prop[,1], ...) curve(exp(m * x + k)/(1 + exp(m * x + k)), add=T) }