annotate test/recreate_full.R @ 4:8cc9fc8eacac draft

" master branch Updating"
author lain
date Thu, 17 Dec 2020 12:54:10 +0000
parents a174cbbb12dd
children 5be8a770a11d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
1 #!/home/lain/R/bin/Rscript
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
2
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
3 ZIP <- FALSE
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
4
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
5 file.copy("../convert/yann.rdata", "../convert/yann.rdata.old")
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
6 load("../convert/yann.rdata", rdata <- new.env())
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
7
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
8 listOFlistArguments <- rdata$listOFlistArguments
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
9 diffrep <- rdata$diffrep
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
10 variableMetadata <- rdata$variableMetadata
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
11 xa <- rdata$xa
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
12 if (ZIP) {
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
13 zipfile <- normalizePath("../convert/yann.zip", mustWork=TRUE)
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
14 singlefile <- rdata$singlefile
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
15 } else {
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
16 singles <- list.files("../convert/")
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
17 singles <- singles[singles != "yann.rdata"]
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
18 singlefile <- list()
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
19 for (single in singles) {
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
20 singlefile[tools::file_path_sans_ext(single)] <- normalizePath(paste0("../convert/", single))
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
21 }
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
22 zipfile <- NULL
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
23 print(singlefile)
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
24 }
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
25
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
26 save(
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
27 zipfile,
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
28 listOFlistArguments,
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
29 diffrep,
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
30 variableMetadata,
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
31 xa,
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
32 singlefile,
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
33 file="../convert/yann.rdata"
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
34 ,version=2
a174cbbb12dd " master branch Updating"
lain
parents:
diff changeset
35 )