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

Error in if (class(out$Data) == "numeric") datadimnames <- "time" : the condition has length > 1 #92

Open
AniSanchez opened this issue Apr 4, 2024 · 2 comments

Comments

@AniSanchez
Copy link

Hi! I´m having this error while trying to run the loadStationData function:

Error in if (class(out$Data) == "numeric") datadimnames <- "time" :
the condition has length > 1

The script is this one:

dir_obs <- 'C:/Users/data/'
obs <- loadStationData(dataset = dir_obs, var = "precip", stationID = "000001", years = 1990:2014)
y <- obs

Anybody who could solve this issue?
Thanks

@miturbide
Copy link
Member

Hi @AniSanchez ,
This is related to the upgrade of R from version 3 to 4, as in R.4, the output for the class() call returns a string with more than one element in this case. All the packages of climate4R were adapted to R.4. In particular, this issue was already resolved in the latest version of loadeR (1.8.1).

@AniSanchez
Copy link
Author

Thank you! That solved my issue!

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