# remove log files generated by PLINK
cleanLog = function(dir, ext=c("log", "nosex"), verbose=FALSE) {
for(extIter in ext) {
filesToClean = Sys.glob(file.path(dir, paste("*.", extIter, sep="")))
if(length(filesToClean) > 0) {
if(verbose) {
print(filesToClean)
wantRemove = readline("Want to remove these files? (yes/no)")
wantRemove = str_trim(wantRemove)
if(wantRemove == "yes") file.remove(filesToClean)
else message("Abort")
} else {
file.remove(filesToClean)
}
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.