Commit 6bf1a6bc authored by Enrico Schumann's avatar Enrico Schumann

[write_ts_table] Remove warning when overwriting files

with 'replace.file' set to TRUE, check whether files
exists before removal: this avoids the warning about
non-existing files
parent 5ac2af23
2018-03-21 Enrico Schumann <es@enricoschumann.net>
* R/functions.R (write_ts_table): with
replace.file set to TRUE, check whether files
exists before removal (this avoids the warning
about non-existing files)
2018-02-02 Enrico Schumann <es@enricoschumann.net>
* inst/tests/write_read.R: add timing test
......
......@@ -73,7 +73,7 @@ write_ts_table <- function(ts, dir, file,
file
else
file.path(dir, file)
if (replace.file) {
if (replace.file && file.exists(dfile)) {
file.remove(dfile)
}
if (ans == 0L) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment