R/seqStat.R

seqStat <- function(DNAbin, thresh = 500){
    cd <- checkDNA(DNAbin, gapsAsMissing = TRUE)
    rr <- sapply(DNAbin, length) - cd
    tab <- table(NULL)
    tab[1:5] <- c(min(rr), max(rr), mean(rr), median(rr), length(which(rr < thresh)))
    names(tab) <- c("Min", "Max", "Mean", "Median", "Thresh")
    tab <- round(tab, digits = 0)
    return(tab)
}

Try the spider package in your browser

Any scripts or data that you put into this service are public.

spider documentation built on May 2, 2019, 5:16 p.m.