systematicinvestor/SIT

SIT is dead? Or is it me?

Opened this issue · 17 comments

I just freshly installed R and RStudio, as well as SIT. I haven't used SIT in a while, so I'm not sure if the problem is SIT being dead or if it's a problem particular to me, but every code I attempt to run in SIT produces:

Error in if (type == "Date" || type == "yearmon" || type == "yearqtr") temp = as.Date(temp) :
missing value where TRUE/FALSE needed

All my other past code (non-SIT related) works fine on my new system, so I have to wonder whether SIT has stopped working with the newest update of R.

Any input would be appreciated. Thanks!

Please try updating SIT and SIT.date packages

devtools::install_github('systematicinvestor/SIT.date')
curl::curl_download('https://github.com/systematicinvestor/SIT/raw/master/SIT.tar.gz', 'SIT.tar.gz',mode = 'wb',quiet=T)
install.packages('SIT.tar.gz', repos = NULL, type='source')

All updated, but still getting the same error.

All works with R version 4.0.3.

Could you try installing development version of xts and quantmod packages:

devtools::install_github('joshuaulrich/xts')
devtools::install_github('joshuaulrich/quantmod')

I've been troubleshooting this for two days and have gone through all the recommended processes. I have 4.0.3 installed and have run those two lines yet I still get the "missing value" error no matter what SIT function I run.

Here is the error I get for plota.test(), with traceback:

Error in if (type == "Date" || type == "yearmon" || type == "yearqtr") temp = as.Date(temp) :
missing value where TRUE/FALSE needed
4.
index.xts(y1)
3.
index(y1) at con#13928
2.
as.Date(index(y1)) at con#13928
1.
plota.test()

Is there any update on this? I'm still unable to run any SIT code.

Unfortunately I cannot replicate the issue. All works with R version 4.0.3.

One thing to try is to install fresh copy of R and follow installation steps below. Hopefully this will solve the issue.

devtools::install_github('systematicinvestor/SIT.date')
curl::curl_download('https://github.com/systematicinvestor/SIT/raw/master/SIT.tar.gz', 'SIT.tar.gz',mode = 'wb',quiet=T)
install.packages('SIT.tar.gz', repos = NULL, type='source')

This was a fresh install on a new system, but perhaps I did something in the process to screw things up.

I am happy to delete everything and re-install if you think that will do the trick - I can even record the whole process to have a record (if you're willing to view it) so as to figure out where we went wrong.

I am using RStudio - do you think this makes any difference?

Any update on this?

Can anyone replicate the error I'm having?

So I just deleted and reinstalled R for a second time. Of course I reinstalled SIT, too. Now, when I run plota.test() I get:

Error in UseMethod("layout") :
no applicable method for 'layout' applied to an object of class "c('double', 'numeric')"

A different error message, but an error nonetheless. Any idea with this one?

My guess is that the error is caused by the 'plotly' package. Can you run sessionInfo() command and check if 'plotly' is listed.

Please restart your R session (Ctrl+Shift+F10 in RStudio).
Run sessionInfo() to check that 'plotly' package is not loaded.
Check if SIT is working

Dear Michael,

I love your SIT package. But since switching to a new machine with a fresh R installation (4.0.3) on Manjaro, your package is unfortunately not usable anymore. I posted a question on https://stackoverflow.com/questions/65876940/how-install-r-3-6-3-on-manjaro?noredirect=1#comment116474998_65876940.

Maybe the stackoverflow experts can support us to get this issue solved.
By the way can you pls. let me know which data.table version do you use? On my windows notebook (R 3.6.3) I have 1.12.2 installed and everything works but on my Manjaro Workstation (R 4.0.3) I have the version 1.13.6 and nothing works.

Best regards,
Michael

Hi Michael,thank you for reporting the bug. I fixed the bug and updated the package. Please reinstall.

curl::curl_download('https://github.com/systematicinvestor/SIT/raw/master/SIT.tar.gz', 'SIT.tar.gz',mode = 'wb',quiet=T)
install.packages('SIT.tar.gz', repos = NULL, type='source')

I don't think plotly is my problem. Here is my session info:

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Japanese_Japan.932 LC_CTYPE=Japanese_Japan.932 LC_MONETARY=Japanese_Japan.932
[4] LC_NUMERIC=C LC_TIME=Japanese_Japan.932

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] quadprog_1.5-8 lattice_0.20-41 codetools_0.2-16 zoo_1.8-8
[5] foreach_1.5.1 MASS_7.3-53 grid_4.0.3 PerformanceAnalytics_2.0.4
[9] quantmod_0.4.17.1 curl_4.3 TTR_0.24.2 xts_0.12.1.1
[13] boot_1.3-25 blotter_0.15.0 iterators_1.0.13 tools_4.0.3
[17] FinancialInstrument_1.3.1 compiler_4.0.3 quantstrat_0.16.8

Hi Michael,

thanks for fixing it. It works for me now.
@veriald: I noticed you have quantmod_0.4.17.1 in place. I have version 0.4.18.1 installed by devtools::install_github('joshuaulrich/quantmod')
Hopefully this helps to use the great SIT package again.

Best regards,
Michael

@michimanjaro I updated quantmod as you suggested but I'm still getting the same error when I try to run SIT.

Anyone able to get this working?