I have a R package that i need to use. The package in question is BQuant.
The package is downloadable as a zip file which (I found out later) contains windows binaries. First I tried to extract these binaries and pack it in .tar.gz And i installed the .tar.gz package using install.packages().
This didn’t give any error but when i tried to call any function of the package R gave me the error: Error: could not find function <function_name>.
So then i found the source files and tried extracting and repacking in .tar.gz. This time, during the installation the error was: **ERROR: Windows-only package**
When i checked the description in the source files it said OS_type: windows. I removed that line and tried again. This time the error was:
gcc -std=gnu99 -shared -o BQuant.so dp.o -L/usr/lib/R/lib -lR
dp.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: ***[BQuant.so] Error 1
ERROR: compilation failed for package ‘BQuant’
So in brief:
I need to know whether this windows package can be installed in Linux.
I think you need to change a bit in the ‘BQuant\R\fcn_preproc.r’ file.
This file loads the dll file, which is a windows only file.
You might try to add a test based on platform.
This might do the trick.
Also don’t forget to change the os line the dependent file.
To try to compile the .c file, you can use this command from terminal.
As per : http://www.ats.ucla.edu/stat/r/library/interface.pdf and http://www.maths.lancs.ac.uk/~prangle/CinR/CinR.pdf