Closed climbthemt closed 3 years ago
Right, so the dependency is with the distributional.boxplot() function which uses the gamlss() function from the gamlss package. Either we "port" the code directly in quantstrat, or we use another approach or we comment out the use of distributional.boxplot() functions completely in this demo...
Well, I'm just getting serious with quantstrat, and the signal analysis and validation part of it. So I don't know what that graph would have shown. If it shows something really important that would help diagnostically to validate a signal I'd say port it over. But I do not have the knowledge to make that call. My ticket was just a 'hey, I saw something failed you need to be aware of' kind of trouble ticket.
This is the plot you get from that call to distributional.boxplot() if you specify xlim=c(0,10) which we should do in that demo script.
I will port the code to a new branch, and appreciate your testing the new branch when i have.
After some testing, and dependency rabbit holes it is occurring to me that we could simply download the archived package from GitHub whilst it is not on CRAN...i am testing this approach and it appears to be working...
So, if you install gamlss and gamlss.util from GitHub with the below code:
require(devtools)
install_github("cran/gamlss")
install_github("cran/gamlss.util")
then install the latest commit to this quantstrat branch,
install_github("braverock/quantstrat", ref = "be2e3ee")
then run the below (note i have changed the signal.RSI demo slightly by calling the distributional.boxplot first and then the signal.plot.
demo("signal.RSI")
then i suspect you will experience joy.
Please do let us know?
Well, no love yet. I get :+1:
GAMLSS-RS iteration 1: Global Deviance = 28964.94 GAMLSS-RS iteration 2: Global Deviance = 28964.94 gamlss package currently doesnt support encapsulation of their plotting function. Pending Patch.
Please make sure your plot window pane is large enough to plot and try again? I recall getting an error, and that message is returned from the tryCatch statement (https://github.com/braverock/quantstrat/blob/6c536dbe97d0efb622c853d8d9445f9b2933b040/R/signals.R#L922), when i think the error is something else.
Plots strangely. Probably because of the 'rows=2, columns = 5)' from the first plot
I changed the RSI demo so that the distributional box plot displays first, then the signal plots. If you installed the package with install_github("braverock/quantstrat", ref = "be2e3ee")
it should work ok, or just use your own script calling the distributional boxplot first followed by the signal plots.
Success! I had to reinstall again from github. Ran demo and got what the expected graphs. Closed!
Description
demo/signal.RSI.R requires gamlss.util but gamlss.util is no longer available in cran.
Expected behavior
Expected gamlss.util library to be available.
Minimal, reproducible example
require(gamlss.util) # depends on gamlss Loading required package: gamlss.util Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, : there is no package called ‘gamlss.util’
From cran website: "Package ‘gamlss.util’ was removed from the CRAN repository. Formerly available versions can be obtained from the archive. Archived on 2020-09-03 as check issues were not corrected in time. A summary of the most recent check results can be obtained from the check results archive. Please use the canonical form https://CRAN.R-project.org/package=gamlss.util to link to this page."
Session Info