R/shuffleLines.R

shuffleLines = function(phenoFileOrig, phenoFile, shuffleVar) {
    tab = read.table(phenoFileOrig, head=TRUE)
    # print(head(tab, 10))
    tab[, shuffleVar] = sample(tab[, shuffleVar])
    # print(head(tab, 10))
    write.table(tab, phenoFile, quote = FALSE, row.names = FALSE)
}
kindlychung/collr2 documentation built on May 20, 2019, 9:57 a.m.