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

reformat_GSOD() does not use file_list input parameter #78

Closed
oxalisids opened this issue Jun 19, 2020 · 2 comments
Closed

reformat_GSOD() does not use file_list input parameter #78

oxalisids opened this issue Jun 19, 2020 · 2 comments

Comments

@oxalisids
Copy link

Session Info

See reformat_GSOD() source code below. Object file_list is an input parameter, but it is reassigned automatically when dsn is not NULL, and input value is ignored. I suppose file_list is only used when input dsn is NULL, but that is not clear in the package documentation, and the required format for file_list is also not clear from documentation. Thank you for the package!

Alison


reformat_GSOD <- function (dsn = NULL, file_list = NULL)
{
isd_history <- NULL
load(system.file("extdata", "isd_history.rda", package = "GSODR"))
setkeyv(isd_history, "STNID")
if (!is.null(dsn)) {
file_list <- list.files(path = dsn, pattern = "^.*\.csv$",
full.names = TRUE)
if (length(file_list) == 0)
stop("No files were found, please check your file location.")
}
GSOD_XY <- .apply_process_csv(file_list, isd_history)
return(GSOD_XY)
}

@adamhsparks
Copy link
Member

Thanks for pointing this out!

I've updated the documentation and modified the function's behaviour to emit a message when both are specified.

Is this more helpful?

8d40b42

@adamhsparks
Copy link
Member

Closing issue. Feel free to reopen if this hasn't addressed it fully.

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

No branches or pull requests

2 participants