Manual install of R-package "xlsReadWrite" on OS X - r

I'm having trouble with manual install of an R-package called "xlsReadWrite." I know there are other packages available that can read Excel or csv files in to R, but I need to use this specific package as it is integrated in various places of a quite long script I want to use.
I'm using R-Studio Version 0.98.1091 on a Mac OS X (10.10.3)
The package is no longer available on CRAN, but there's a zip file available online here:
http://www.swissr.org/download
I can manually install the package but then when I hit the check mark I get the following error output:
library("xlsReadWrite", lib.loc="/Library/Frameworks/R.framework/Versions/3.1/Resources/library")
Error in library.dynam(lib, package, package.lib) :
shared object ‘xlsReadWrite.so’ not found
Error: package or namespace load failed for ‘xlsReadWrite’
I don't know quite how to interpret this. Does anyone have a way of successfully installing this package? Thanks a million in advance!!!
Ben

Related

How to install 'XLConnect'-package in R correctly

I am very new to this community.
My aim is to use R for statistical analysis but some errors occurred.
In the first step, I want to load the "XLConnect"-package, in order to open an xlsx-data file, with this code:
install.packages('XLConnect')
library(XLConnect)
Answer was "package ‘XLConnect’ successfully unpacked and MD5 sums checked", after which the following error was given:
Error in library(XLConnect) : the package ‘XLConnect’ doesn't exist.
I also tried the xlsx package, but in this case always got:
Error in -library('openxlsx') : invalid argument to unary operator
or, that the package openxlsx, doesn't exist but some line before it told me the download, installation and check sums were correct!
Additionally, when I try to change the directory in a script, using
getwd(), the following error occurs:
Error in -getwd() : invalid argument to unary operator
When I type it in the console it works.
I downloaded R here: https://cran.r-project.org/bin/windows/base, installed R version 3.4.3 as well as R Studio.
I already looked in the community for some hints but neither could solve my problem:
XLConnect function is not passing argument to system.file
Error when installing XLConnect in RStudio
MY OS is Windows 10, I tried the 32-bit as well as the 64-bit version of R and installed fitting Java-Versions for both verisons( that was the first error that occured but now isn't there anymore).
I tried to load the packages from several CRAN-Mirrors but always the same error occurs (e.g. Germany(Göttingen),Germany(Münster), Belgium(Ghent) or Switzerland ).
Maybe I missed some very basic setting. Is the information I provided enough or do you need more?
Thanks a lot in advance for your support!
Thanks a lot! I installed java 32-bit and 64-bit versions the way it is recommended here: https://www.r-statistics.com/2012/08/how-to-load-the-rjava-package-after-the-error-java_home-cannot-be-determined-from-the-registry/ and I installed the rJava package like this: install.packages("rJava")
library(rJava) and here: https://askubuntu.com/questions/176115/what-is-the-best-way-of-installing-the-r-package-xlconnect I found that this here should work to register R correctly: sudo R CMD javareconf but then I get the error that the console got an unexpected symbol. Or Do you know how to register Java Development Kit in R correctly. I installed jdk-8u161-windows-x64.
Make sure you have Java Development Kit installed and correctly registered in R.

Where can I find function source codes in a .zip R package?

I'd like to use package CentiServer in R. However, I'm getting the same error with different R versions (3.3.3 and 3.1.1):
Warning: unable to access index for repository
https://cloud.r-project.org/bin/windows/contrib/3.1 Warning message:
package ‘CentiServer’ is not available (for R version 3.1.1)
This post is a great source, still, these steps couldn't help me to find a solution: How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
Since I cannot install the package, I started to think about that it could be easier to just find the source codes of some useful functions in the .zip file. Where can I find those in the .zip file?
Thank you in advance.

Install package "locClass" in R

I want to install a package named "locClass" in R but always failed and kept getting the following warning:
install.packages("locClass", repos="http://download.r-forge.r-project.org/")
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘locClass’
These will not be installed
The install command is referred to: https://r-forge.r-project.org/R/?group_id=1187
Also, I downloaded the package source from the above website. But R returned the following:
library(locClass)
Error in library(locClass) : ‘locClass’ is not a valid installed package
My R version is 3.3.3. I tried the 3.4.0 but failed the same way.
This is not exactly a solution but an alternative to utilize functionality of package locClass. Download the package file of locClass from here and source(functions.R) present here. This way you can use all functions available in package.
Note : function.R means FLXMCL.R, FLXMCLconstant.R etc.
I'm still looking for a better solution but this is a temporary alternative.

Error while loading bquant package in r

I installed BQuant package in my windows system.When I loaded the package it showed the following error Error: package ‘BQuant’ is not installed for 'arch=i386' . Can anyone please sort it out.If not is there any other packages for NMR analysis in R.
Since according to your recent other question you are only interested in a good peak detection algorithm, you could get the code of the relevant functions directly from the package source (look in folder R inside the zip).

Error while installing R package: package built for universal-apple-darwin

I installed a R package as suggested by How do I install an R package from source?, using R CMD INSTALL [my_pkg_path.tgz]. Package sources are downloaded from r-project.org, e.g., http://cran.r-project.org/web/packages/fields/index.html
However, when I try to load the package using say library(fields), I got the error that complains the package are built for universal-apple-darwin:
Error: package ‘fields’ was built for universal-apple-darwin9.8.0
Guess it's something to do with architecture, but no idea how to resolve it. Any idea? Thanks.
It looks like you downloaded the package's Mac OSX binary file, which usually ends in .tgz - try downloading the package source (usually something ending in .tar.gz) and installing the package again.
Depending on what your operating system is, you may need an additional set of software before you can install packages from source. If the above suggestion doesn't work, would you provide some information about the OS, for example from sessionInfo()?

Resources