Skip to content
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

Refine data handling #297

Closed
trangdata opened this issue Nov 18, 2024 · 1 comment · Fixed by #299
Closed

Refine data handling #297

trangdata opened this issue Nov 18, 2024 · 1 comment · Fixed by #299

Comments

@trangdata
Copy link
Collaborator

#211 (comment):

get_coverage <- function(entity = NULL) {
  utils::data("oa2df_coverage", envir = environment(), package = "openalexR")
  oa2df_coverage <- oa2df_coverage

An alternative to utils::data() that's less side-effect-y is to use oa2df_coverage <- get("oa2df_coverage", envir = asNamespace("openalexR")).

Related mastodon post.

@yjunechoe
Copy link
Collaborator

Nerd snipe successful! https://mastodon.social/@klmr/113506139059973856

I think we can do:

get_coverage <- function(entity = NULL) {
  oa2df_coverage <- getExportedValue("openalexR", "oa2df_coverage")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants