« Revised FNC protocol | Main | co-flowering species »

lists of random numbers for visors

Here's a snippet of code I used to generate files to upload to visors.

makeRandFileForVisor <- function(size = 50, fname = "xyz"){
write.table(sample(1:size),
                 file = paste("E:\\shared\\rand",
                                    size, 
                                    fname,
                                    ".txt", 
                                    sep=""), 
                 quote= FALSE,
                 row.names= FALSE, 
                 col.names= paste("rand",size,fname, sep="")) }
visors <- c("ag","dr","kg","ad","cr","gk",
            "mmj","mj","ah","gd","sw","rs")
for (i in visors) {
makeRandFileForVisor(20,i)
makeRandFileForVisor(50,i)
makeRandFileForVisor(100,i)
makeRandFileForVisor(200,i)
}

TrackBack

TrackBack URL for this entry:
http://blog.lib.umn.edu/cgi-bin/mt-tb.cgi/89291

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)