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 running the example code #1

Open
ernesto561 opened this issue Apr 14, 2023 · 3 comments
Open

Error running the example code #1

ernesto561 opened this issue Apr 14, 2023 · 3 comments

Comments

@ernesto561
Copy link

ernesto561 commented Apr 14, 2023

Hello,

Thanks for this package. It's the most complete package for the calculation of IDF curves I have found. I am having some problems running the example code. When I run these lines:

Meteorology station in the Farfan Airport in Tulua, Colombia.

data(inten)
Test.idftool <- IDFCurve(Data = inten, Station='2610516', Duration = FALSE,
Periods = FALSE, Type = "gumbel", M.fit = "lmoments",
Plot = 1234, Strategy = 1, logaxe = "", CI = FALSE, CIpdf = TRUE, iter = 50,
goodtest = FALSE, Resolution = 300, SAVE = FALSE, name = TRUE)

I get the following result:

[1] "Just compute a strategy"
Error in eval(stats::getCall(object)$data) : object 'MD.INT' not found

The plots are created, although it generates an empty one at the end. The problem is that the data are not saved in the variable Test.idftool. I have tried to look for the object MD.INT in all the R scripts but haven' found anything. My R version is 4.2.2. Thanks.

@ernesto561
Copy link
Author

ernesto561 commented Apr 17, 2023

I have been looking through the code and it seems the problem is in the function Plotfit of the investr package. It's used in the regIDF function. The problem is with the version 1.4.2. If I downgrade the package to the version 1.4.0, the code works correctly.

@dazamora
Copy link
Owner

dazamora commented Apr 18, 2023 via email

@ernesto561
Copy link
Author

Hello David,

Thanks for your answer. The problem is in the function investr::plotFit. In the latest version (1.4.2) the function is not working. You have to downgrade to 1.4.0 or install the development version.

Regarding you package, it's very useful. I would only make bigger the text and legends for some plots, but the output data can be used to create custom plots anyway. I like that the output includes the coefficients for the IDF equation. Thanks for your package.

I don't know if this issue should still be open, because it's related to another package.

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