search for: no_object_here

Displaying 1 result from an estimated 1 matches for "no_object_here".

2018 Feb 07
1
saveRDS() overwrites file when object is not found
...ran into this behaviour when accidentally running a line of code that I shouldn't have. When saving over an rds with an object that's not found, I would have expected saveRDS to not touch the file. saveRDS(iris, "test.rds") file.size("test.rds") #> [1] 1080 saveRDS(no_object_here, "test.rds") #> Error in saveRDS(no_object_here, "test.rds"): object 'no_object_here' not found file.size("test.rds") #> [1] 20 file.remove("test.rds") [[alternative HTML version deleted]]