Package or namespace load failed for ‘RxODE’ .onAttach failed in attachNamespace() for 'RxODE', - namespaces

I am trying to create a model simulation using RxODE, this R-code was successful previously on a colleague's computer. R was just reinstalled on the computer I am currently using (version 3.6.2). I continue to get this error...
Error: package or namespace load failed for ‘RxODE’:
.onAttach failed in attachNamespace() for 'RxODE', details:
call: !.rxWinRtoolsPath(retry = NA)
error: invalid argument type
I have tried .libPaths(.libPaths()[2]), reinstalling all my packages, and to install RxODE with dependencies=TRUE.
Any insight would be greatly appreciated.

https://github.com/cran/RxODE/issues/1#issuecomment-320900446
I had the same problem like you and could solve it with the description given in the link.
Or in other words, just try to run this code:
path <- Sys.getenv("PATH")
path <- c("C:\Rtools\bin", "C:\Rtools\gcc-4.6.3\bin", path)
path <- paste(path,collapse=";")
Sys.setenv(PATH=path)
Sys.getenv("PATH")
Best wishes

Related

apache drill: "no current connection" error and "could not find or load main class sqlline.sqlline" error

I am using JDK: 1.8.0.281 and Drill: 1.18.0 on m1 Mac.
I cannot start drill downloaded from https://drill.apache.org/download/ directly. It says
could not find or load main class sqlline.sqlline. So I refer to https://github.com/julianhyde/sqlline/issues/69, download and compile sqlline and add these two lines
BINPATH=/Users/fields/Repositories/sqlline-sqlline-1.9.0/bin
exec java -cp $BINPATH/../target/sqlline-1.9.0-jar-with-dependencies.jar sqlline.SqlLine "$#"
to the beginning of drill/bin/sqlline. Then I start drill-embedded and get no current connection every time I enter a query.
Please help me identify the problem. Thanks a lot!!!

configure: error: Cannot find private header tclInt.h in /home/dave/src/tcl-builds/raw/tcl8.4.1

I am trying to build open source tcl code.
I am hitting error below:
configure: error: Cannot find private header tclInt.h in /home/dave/src/tcl-builds/raw/tcl8.4.1
from the configure script I am not seeing the path mentioned above in error message..i am not sure from where this path is coming.
Any help?
FYI, I Tried this WAR : https://sourceforge.net/p/expect/bugs/30/ which did not help.

how to resolve ResolveLibraryProjectImports" task failed unexpectedly Exception

ResolveLibraryProjectImports" task failed unexpectedly
System.IO.FileNotFoundException Could not load assembly
I have tried to resolve it like clean bin, obj rebuild again said in the previous results of this issue but it doesn't work for me. Does anyone have a solution for this issue, please help me.
Note: I am having an error in Mono.Android in the References of portable code is this the problem and how to resolve this also?
This is the error I get:
Error The "ResolveLibraryProjectImports" task failed unexpectedly. System.IO.FileNotFoundException: Could not load assembly 'SampleProject, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'SampleProject.dll'
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection1 resolvedEnvironments)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() SampleProject.Android Build
=> delete all from C:\Users\username\AppData\Local\Xamarin
=> delete .vs folder
=> restart visual studio in run as admin(if not).
=> clean and rebuild.
Mono.Android is purely a native Android dll for Xamarin.Android
using this in your portable project will throw an error (Of Course.)
This might be the issue if the error still persists after removing the dll then I would suggest you remove the bin obj folders and clean build and in case it still persists you should upload the output window for the debug build as well as error list explanation for this particular error.

How to import a packge from a local jar in pyspark?

I am using pyspark to do some work on a csv file, hence I need to import package from spark-csv_2.10-1.4.0.jar downloaded from https://repo1.maven.org/maven2/com/databricks/spark-csv_2.11/1.4.0/spark-csv_2.11-1.4.0.jar
I downloaded the jar to my local due to proxy issue.
Can anyone tell me what is the right usage of referring to a local jar:
Here is the code I use:
pyspark --jars /home/rx52019/data/spark-csv_2.10-1.4.0.jar
it will take me to the pyspark shell as expected, however, when I run:
df = sqlContext.read.format('com.databricks.spark.csv').options(header='true',inferschema='true').load('hdfs://dev-icg/user/spark/routes.dat')
the route.dat is uploaded to hdfs already at hdfs://dev-icg/user/spark/routes.dat
It gives me error:
: java.lang.NoClassDefFoundError: org/apache/commons/csv/CSVFormat
If I run:
df = sqlContext.read.format('com.databricks.spark.csv').options(header='true',inferschema='true').load('routes.dat')
I get this error:
py4j.protocol.Py4JJavaError: An error occurred while calling o72.load.
: java.lang.NoClassDefFoundError: Could not initialize class
com.databricks.spark.csv.package$
Can anyone help to sort it out for me? Thank you very much. Any clue is appreciated.
The correct way to do this would be to add the options (say if you are starting a spark shell)
spark-shell --packages com.databricks:spark-csv_2.11:1.4.0 --driver-class-path /path/to/csvfilejar.jar
I have not used the databricks csvjar directly, but I used a netezza connector to spark where they mention using this option
https://github.com/SparkTC/spark-netezza

Creating JDBC driver in R using RJDBC

I am trying to create a JDBC driver in R using following code:
i have already set the directory to location where .jar folder is located
drv <- JDBC("com.mysql.jdbc.Driver",
"mysql-connector-java-3.1.14-bin-g.jar",
identifier.quote="`")
i get the following error:
Error in .jfindClass(as.character(driverClass)[1]) : class not found
what would be the problem?
the following works for me i.e. i do not get "class not found" error. I downloaded mysql-connector-java-5.1.38-bin.jar into my current working directory and ran the below without issues
library(RJDBC)
drv <- JDBC(driverClass="com.mysql.jdbc.Driver",
classPath="mysql-connector-java-5.1.38-bin.jar",
identifier.quote="`")
I had a problem loading the script drv <- JDBC("com.mysql.jdbc.Driver","PATH_to_jar", ...) in R, although the PATH was correct. There was a Java update in my Linux distro which caused the package rJava or RJDBC not to work anymore. Unfortunately, the error message was that class com.mysql.jdbc.Util could not be found when executing the subsequent dbConnect(drv, ...) after this update. This was a bit strange and took me a while to figure out that the package was broken, because it loaded correctly using library(RJDBC).
My solution was to reinstall rJava and RJDBC to make it work again (packages.install("rJava") packages.install("RJDBC")). I recognized it was a Linux problem since the code worked fine in RStudio on Windows.