I'm trying to install the package quantstrat, however I always get following errors trying this:
--Error : object ‘importDefaults’ is not exported by 'namespace:quantmod'
Failed with error: ‘package ‘FinancialInstrument’ could not be loaded’
Now, when I tried to load the package FinancialInstrument, R throws the following error:
--Error : object ‘importDefaults’ is not exported by 'namespace:quantmod'
I am not sure what to do to get the package quantstrat loaded. I am using the R version 3.0.0 on windows 64 bit system. Any help would be very much appreciated.
Related
I've recently run into an error that I have not encountered before in RStudio. I'm currently using the newest version of R, 4.1.2. I've installed a package called "redist" and when I load the package in RStudio, I get the following error:
Error: package or namespace load failed for ‘redist’:
.onLoad failed in loadNamespace() for 'units', details:
call: udunits_init(path)
error: no database found!
The following code snippet ist what I used to install and run the package.
install.packages("redist", dependencies = TRUE)
library(installr)
I'm not really sure where to look for this error or how to fix this. Has anyone run into something similiar or does anyone have any advice on what to do?
Messing around with some things, I've come upon a solution that works, even though this may be related to the package itself.
Before loading the redist package, it's necessary to load the udunits2 package. Loading the library then works.
I am having difficulty installing the zenplots package in R. For some odd reason when I use install.packages('zenplots') on my machine (Mac OS Catalina V-10.15.7) it installs fine... but when I try and install it on my second machine (also Mac OS Catalina V-10.15.7) and if I try and install it on my institutes server I get the following error:
Warning in fun(libname, pkgname) : couldn't connect to display ":0"
Error : package or namespace load failed for ‘loon’: .onLoad failed
in loadNamespace() for 'loon', details: call:
structure(.External(.C_dotTcl, ...), class = "tclObj") error: [tcl]
couldn't connect to display ":0".
Error: unable to load R code in package ‘zenplots’ Execution halted
I have also tried to install directly from GitHub using remotes::install_github('great-northern-diver/zenplots', force = T) but I get the same error as above.
I have even tried using install.packages("zenplots", repos="http://R-Forge.R-project.org") which works but unfortunatley this version doesn't contain all the functions found in zenplots.
My R version is above version 3.4.0, which is required for zenplots and as per the documentation I have already installed the graph package from BioConductor.
Any suggestions as to what might be the issue here?
I would guess that the R on your server was compiled without some feature required by the library. My guess: it is missing either tcltk or X11 support. To check do the following:
capabilities()
And see which features return FALSE, meaning they are not enabled.
I was trying to use rpy2 to interoperate R and python in jupyter. It was just a curiosity experiment. It is not working due to package imports.
But what is not an experiment is to be able to install packages in R . I can no longer do so after installing rpy2. The following is happening in R:
> install.packages('ggplot2')
.. various errors including
In file included from /Users/steve/miniconda3/lib/R/include/R.h:50:
/Users/steve/miniconda3/bin/../include/c++/v1/cmath:317:9: error: no member named 'signbit' in the global namespace
Why is miniconda3 in the picture at all here?
Later we see:
ERROR: compilation failed for package ‘isoband’
* removing ‘/Users/steve/miniconda3/lib/R/library/isoband’
ERROR: dependency ‘isoband’ is not available for package ‘
Why is the R library directory now pointed to miniconda3 ? How do I get back to the normal R libraries location?
When I run these two lines
install.packages(highcharter)
library(highcharter)
I get this error
package �highcharter� was built under R version 3.6.3Error: package or namespace load failed for ‘highcharter’ in readRDS(ffile):
unknown input format
How to fix it?
I am trying to install the package "rjags" in R but am running into the following error:
Loading required package: rjags
Error : .onLoad failed in loadNamespace() for 'rjags', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/rjags.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/rjags.so, 10): Symbol not found: __ZN5RangeC1ERKSt6vectorIiSaIiEES4_
Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/rjags.so
Expected in: /usr/local/lib/libjags.3.dylib
in /Library/Frameworks/R.framework/Versions/3.1/Resources/library/rjags/libs/rjags.so
Error: package ‘rjags’ could not be loaded
I've installed JAGS on my Mac (running Mavericks), and I am running R-3.1.2. I've tried installing from the url using the devtools package, as recommended by this site:
install_url("http://sourceforge.net/projects/mcmc-jags/files/rjags/3/rjags_3-2.tar.gz",
args="--configure-args='--with-jags-include=/Users/casallas/homebrew/opt/jags/include/JAGS
--with-jags-lib=/Users/casallas/homebrew/opt/jags/lib'
"
)
I've also gone through the instructions on this other site , trying the different versions of JAGS and receive the same error. I'm at a loss for what to try next and am sure the solution is simple. Does anyone have any insights? Thanks so much!
I found that while I was unable to install rjags from the url, if I installed the package from source on my computer I was successful. I did this by downloading the appropriate package from here (which for me was rjags_3-14.tgz) and ran the following command:
install.packages(path_to_file, repos = NULL, type="source")
The error:
Symbol not found: __ZN5RangeC1ERKSt6vectorIiSaIiEES4_
Is (nearly) always caused by a mismatch between standard libraries between the Mavericks build of R (actually rjags) and Snow Leopard build of JAGS (or vice versa). For more info see the instructions at https://sourceforge.net/projects/mcmc-jags/files/JAGS/3.x/Mac%20OS%20X/
I'm guessing that compiling the package yourself from source worked because it matched the version of the standard library that JAGS is using, but this will no longer match the version that R is using (although I'm not sure if this is a major problem, it is not recommended). You would be better to match the builds of R and JAGS and use the pre-built rjags library from CRAN.
It is interesting that you say you have tried both builds of JAGS but I suggest trying again along these lines:
1) Use .Platform$pkgType in R to confirm if it you are using mac.binary (SL) or mac.binary.mavericks (Mavericks) - or failing that re-install the Mavericks binary of R from CRAN
2) Exit R
3) Re-install the appropriate version of JAGS
4) Re-open R and re-install the rjags library from CRAN
5) Try library(rjags)
If this doesn't work can you provide more information so I can try and track down a possible problem with the JAGS builds?
Thanks,
Matt