Description Usage Arguments Value Examples
The function calculate MD5 fingerprint for each file in table and then check to see if any two files have same MD5 fingerprint. The files with same fingerprint will be treated as duplication. The function will return a table contains all duplicated files and datasets.
1 | validateFile(fileTable, saveMd5File = TRUE)
|
fileTable |
a table with column name "dataset" and "file", here column "file" should contain full name of file. |
saveMd5File |
if calculated MD5 fingerprint should be save to local file |
a list contains two tables. One is the table contains three columns: "dataset", "file" and "md5". Another one is the duplication table whose row indicates MD5 fingerprint and whose column indicates dataset, table cell indicates the corresponding filename.
1 2 3 4 5 6 7 8 9 | rootDir<-paste0(dirname(tempdir()), "/DupChecker")
datafile<-buildFileTable(rootDir=rootDir)
if(nrow(datafile) > 0){
result<-validateFile(datafile)
if(result$hasdup){
duptable<-result$duptable
write.csv(duptable, file="duptable.csv")
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.