How to get ReporteRs to work after installing officer - r

I've been using the ReporteRs package to generate MS Word documents from R. Due to some Java problems, I tried the officer package as well. Ever since I installed officer, I am unable to load the ReporteRs package:
library(ReporteRs)
Loading required package: ReporteRsjars
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘officer’
Warning: Error in : package or namespace load failed for ‘ReporteRs’
I've tried deleting all three packages (both using pacman::p_delete() and by physically deleting the folders from my library) and reinstalling.
If I install all three packages, the error message is:
Error : object ‘ph_from_xml_at’ is not exported by 'namespace:officer'
Warning: Error in : package or namespace load failed for ‘ReporteRs’
I can't even find where this function is called from in ReporteRs or ReporteRsjars and I'm completely at loss as to how to go back to what worked.
Edit:
I've tried both using my (usual) microsoft R version, on which ReporteRs has worked before, and regular R 3.4.
sessionInfo():
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=Danish_Denmark.1252 LC_CTYPE=Danish_Denmark.1252 LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C
[5] LC_TIME=Danish_Denmark.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] compiler_3.4.0 tools_3.4.0
In the Microsoft client, the sessionInfo is
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=Danish_Denmark.1252 LC_CTYPE=Danish_Denmark.1252 LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C
[5] LC_TIME=Danish_Denmark.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RevoUtilsMath_10.0.0 RevoUtils_10.0.3 RevoMods_11.0.0 MicrosoftML_1.3.0 mrsdeploy_1.1.0 RevoScaleR_9.1.0
[7] lattice_0.20-34 rpart_4.1-10
loaded via a namespace (and not attached):
[1] codetools_0.2-15 CompatibilityAPI_1.1.0 foreach_1.4.3 grid_3.3.3 R6_2.2.2
[6] jsonlite_1.3 curl_2.3 iterators_1.0.8 tools_3.3.3 mrupdate_1.0.1

Related

R error: namespace load failed for ‘ggplot2’

I needed to reinstall R after experiencing the blank non-functional Rstudio. After that I got into big troubles with Rstudio, which now would start but is reacting in a weird way. I installed many times ggplot2 and other packages, after which I am getting a message like:
package ‘ggplot2’ successfully unpacked and MD5 sums checked. The downloaded binary packages are in C:\Users\absolution\AppData\Local\Temp\RtmpIJr2z3\downloaded_packages
But when I upload them I am getting an error message:
Error: package or namespace load failed for ‘ggplot2’ in get(Info[i, 1], envir = env):cannot open file 'C:/Users/absolution/Documents/R/win-library/3.4/Rcpp/R/Rcpp.rdb': No such file or Directory
During this process I also observed twice a pop-up window asking if I would like to create a personal library, I clicked once no and the second time yes. So I dont know whats going on.
Here is what I got in the sessionInfo():
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4 gtable_0.2.0 grid_3.4.4
I will highly appreciate your help.

Unable to load shared object Undefined symbol in h5 package, ubuntu 14.04

I am trying to install h5 package in ubuntu 14.04. Before doing so, I have installed hdf5 package, updated the CPPFLAGS and LIBS flags. It is able to link to them correctly. However, after the compiling steps, it is unable to load the package and is giving an error,
Error: package or namespace load failed for ‘h5’ in dyn.load(file, DLLpath = DLLpath, ...)
sessionInfo
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.0
LAPACK: /usr/lib/lapack/liblapack.so.3.0
locale:
[1] LC_CTYPE=en_IN LC_NUMERIC=C LC_TIME=en_IN
[4] LC_COLLATE=en_IN LC_MONETARY=en_IN LC_MESSAGES=en_IN
[7] LC_PAPER=en_IN LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_IN LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0
I have taken care in ensuring that all the dependent package versions are as mentioned in the package requirements.
Will be grateful if someone can help me.

Error while trying to use 'ez' library

I've error while trying to call ez library for rAnova, the issue that I cannot found pbkrtest package while I executed with success install.packages("ez"). library(ez) return to me the following error :
Error in loadNamespace (j <- i [[1L]], c (lib.loc, .libPaths ()) = vI VERSIONCHECK [[j]]): no package named 'pbkrtest' is found
In addition: Warning message: package 'ez' was compiled with version 3.2.5 R Error: loading the package or namespace failed for 'ez'
How can I properly use this library ? Thanks
EDIT : Sessioninfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
[5] LC_TIME=French_France.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.12.0
loaded via a namespace (and not attached):
Error in x[["Version"]] : index out of limits
De plus : Warning messages:
1: In FUN(X[[i]], ...) :
The file DESCRIPTION of the package 'digest' is missing or incorrect
2: In FUN(X[[i]], ...) :
The file DESCRIPTION of the package 'nlme' is missing or incorrect
EDIT 2: Sessioninfo() after restarting machine and R
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
[5] LC_TIME=French_France.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] MASS_7.3-45 Matrix_1.2-7.1 tools_3.2.2 mgcv_1.8-15
[5] nnet_7.3-12 nlme_3.1-121 grid_3.2.2 lattice_0.20-34
but still the same error (above) when tape library(ez).
So it seems that was a question of R version. As noticed in the error and as I understood 'ez' was compiled with version 3.2.5 R. So now i'm under 3.3.1 and I intalled EZ with success and can load the library and use the function. The more complicated is to reinstall R and all packages that seems painful, but thanks to this great post that allow me to store all my packages in a temp folder and to reinstall them in the newest version
For information if it could help someone else, my Sessioninfo() returns :
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8.1 x64 (build 9600)
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C LC_TIME=French_France.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ez_4.3
loaded via a namespace (and not attached):
[1] Rcpp_0.12.7 magrittr_1.5 splines_3.3.1 MASS_7.3-45 munsell_0.4.3
[6] colorspace_1.2-6 lattice_0.20-33 minqa_1.2.4 stringr_1.1.0 car_2.1-3
[11] plyr_1.8.4 tools_3.3.1 nnet_7.3-12 parallel_3.3.1 pbkrtest_0.4-6
[16] grid_3.3.1 nlme_3.1-128 gtable_0.2.0 mgcv_1.8-12 quantreg_5.29
[21] MatrixModels_0.4-1 lme4_1.1-12 Matrix_1.2-6 nloptr_1.0.4 reshape2_1.4.1
[26] ggplot2_2.1.0 stringi_1.1.2 scales_0.4.0 SparseM_1.72
>

rJava gives a NullPointerException in .jcall

I am trying to run a standard corpus loading method in the mallet R package and more specifically
instance <- mallet.import(names(txt$CELEX), txt$TEXT, stoplist.file = "stopwords.en.txt", token.regexp = "\\p{L}[\\p{L}\\p{P}]+\\p{L}")
Then I get the following error
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.NullPointerException
which seems to me more like an rJava error more than anything else. My sysinfo follows:
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=Danish_Denmark.1252 LC_CTYPE=Danish_Denmark.1252 LC_MONETARY=Danish_Denmark.1252
[4] LC_NUMERIC=C LC_TIME=Danish_Denmark.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] mallet_1.0 XLConnect_0.2-12 XLConnectJars_0.2-12 quanteda_0.9.6-9 rJava_0.9-8
[6] topicmodels_0.2-4
loaded via a namespace (and not attached):
[1] Rcpp_0.12.5 lattice_0.20-33 slam_0.1-35 chron_2.3-47 grid_3.3.0 stats4_3.3.0
[7] stringi_1.1.1 data.table_1.9.6 NLP_0.1-9 ca_0.64 Matrix_1.2-6 tools_3.3.0
[13] parallel_3.3.0 tm_0.6-2 modeltools_0.2-21
I use Java 8 in case it matters. I read somewhere that rJava is not playing well with Java 8
That's not the usual error from rJava problems, which seem to have settled down.
One possible problem could be that the stoplist file does not exist or is not in the right place.

Can't connect to a local database using Monetdb.R

I'm trying to set a local connection to a database using Monetdb.R, but for some reason it is not working. I'm using the latest version of monetdb (MonetDB5 64 bits "Jan2014-SP3", 2014-07-25 release) in a Windows 7.
Here it is a short reproducible example:
> library(MonetDB.R)
Carregando pacotes exigidos: DBI
Carregando pacotes exigidos: digest
> conn <- dbConnect(dbDriver("MonetDB"), "monetdb://localhost/demo")
Error in .mapiRead(con) : ERROR reading MAPI block header (0)
I haven't seen this error occuring with other users...
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252 LC_MONETARY=Portuguese_Brazil.1252
[4] LC_NUMERIC=C LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] MonetDB.R_0.9.4 digest_0.6.4 DBI_0.3.0
loaded via a namespace (and not attached):
[1] tools_3.1.1
MonetDB.R 0.9.5 has been released to CRAN. Windows binary distributions should be available shortly.

Resources