Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`.import.rio_dump` not implemented in #10 #240

Closed
bokov opened this issue Oct 9, 2019 · 1 comment
Closed

`.import.rio_dump` not implemented in #10 #240

bokov opened this issue Oct 9, 2019 · 1 comment
Labels
Milestone

Comments

@bokov
Copy link
Contributor

@bokov bokov commented Oct 9, 2019

Please specify whether your issue is about:

  • a possible bug
  • a question about package functionality
  • a suggested code or documentation change, improvement to the code, or feature request

If you are reporting (1) a bug or (2) a question about code, please supply:

  • a fully reproducible example using a publicly available dataset (or provide your data)
  • if an error is occurring, include the output of traceback() run immediately after the error occurs
  • the output of sessionInfo()

Put your code here:

## load package
library("rio")
library("datasets")
## code goes here
export(iris,'iris.dump');
foo <- import('iris.dump');
# Error: Format not supported

# However, it would be easy to support this format by aliasing it to .import.rio_r
foo <- import('iris.dump','r');
traceback
4: stop(out, call. = FALSE) at extensions.R#47
3: .import.default(file = file, ...) at extensions.R#17
2: .import(file = file, ...) at import.R#132
1: import("iris.dump")
session info for your system
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.6 LTS

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/lapack/liblapack.so.3.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rio_0.5.20 testthat_2.2.1

loaded via a namespace (and not attached):
[1] zip_2.0.4 Rcpp_1.0.2 cellranger_1.1.0 compiler_3.4.4
[5] pillar_1.4.2 prettyunits_1.0.2 forcats_0.4.0 remotes_2.1.0
[9] tools_3.4.4 zeallot_0.1.0 digest_0.6.21 pkgbuild_1.0.6
[13] pkgload_1.0.2 memoise_1.1.0 tibble_2.1.3 pkgconfig_2.0.3
[17] rlang_0.4.0 openxlsx_4.1.0.1 cli_1.1.0 rstudioapi_0.10
[21] curl_4.2 yaml_2.2.0 haven_2.1.1 withr_2.1.2
[25] desc_1.2.0 fs_1.3.1 vctrs_0.2.0 devtools_2.2.1.9000
[29] hms_0.5.1 rprojroot_1.3-2 glue_1.3.1 data.table_1.12.4
[33] R6_2.4.0 processx_3.4.1 readxl_1.3.1 foreign_0.8-70
[37] sessioninfo_1.1.1 callr_3.3.2 magrittr_1.5 backports_1.1.5
[41] ps_1.3.0 ellipsis_0.3.0 usethis_1.5.1 assertthat_0.2.1
[45] crayon_1.3.4

@leeper

This comment has been minimized.

Copy link
Owner

@leeper leeper commented Oct 19, 2019

Because dump() can output multiple objects, the implementation actually needs to be more similar to .import.rio_rdata() in order to preserve type safety. Probably by source()-ing to a temporary environment and using which to pull out a named object.

@leeper leeper added the enhancement label Oct 19, 2019
@leeper leeper added this to the v0.6 milestone Dec 20, 2019
@leeper leeper closed this in 0040153 Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.