traversc/qs

`qsavem` gives unexpected error when passing a name to its `file` argument in a function

Closed this issue · 7 comments

The following script gives an unexpected error. But the name result_file actually has a value.

library(qs)
#> qs v0.23.4.
test <- function() {
  result_file <- "test.qs"
  test1 <- rnorm(100)
  test2 <- rnorm(100)
  qsavem(test1, test2, file = result_file)
}
test()
#> Error in c_qsave(x, file, preset, algorithm, compress_level, shuffle_control, : object 'result_file' not found

Created on 2020-11-29 by the reprex package (v0.3.0)

Thanks for the report. @bryce-chamberlain can you have a look? Maybe checking out what base::save does differently?

Should be fixed now if you want to give it a shot.

devtools::install_github("traversc/qs")

@traversc thanks for taking care of this one! December has been a very busy month for me.

@bryce-chamberlain No worries! Have a look when you have a chance and see if it's okay.

@traversc looks good to me. I checked it and it works as expected.
@psychelzh can you confirm this is fixed so we can close the issue? thanks!

@bryce-chamberlain Thanks! Confirmed here. Hope to be released soon.

On CRAN now.