I have a package on windows that builds successfully and works on a windows machine and I would like to make it available on a linux machine
Here are the steps I took in windows
I went to build >> Build Binary package and this created a zip file packageA.zip
Then I used tar to make a tar file from the zip file
tar("packageA.tar.gz" , "C://users/me/packageA.zip)
Then I try to install the package on the linux machine
install.packages("packageA.tar.gz")
but, I get this error
installation of package 'packageA.tar.gz' had non-zero exit status.
Any idea how to install this on linux?
Related
the below shows my attempt to install a package in R using install.packages from a tar.gz but I get an error which is rather unhelpful. Any ideas?
The 127 error message means that there is no C/C++ compiler accessible for the build process in install.packages().
In order to install R packages from source in the Windows operating system, one must first install the R Windows Tools. RTools for Windows may be downloaded from the CRAN RTools for Windows Download Page.
As a long-time user of Matlab for scientific computing, I am exploring Julia as an alternative but would like to use it within the Jupyter notebook.
I have Julia-0.4.5 installed and functional, and previously downloaded the IJulia notebook installation zip file from github.
However, the installation instruction Pkg.add("IJulia") seems to require network access. My machine is currently not networked.
Anaconda3: installed and functional
IPython Notebook: installed and functional (currently Jupyter only runs the python3 kernel)
Edit:
The Julia documentation gives the following instructions. However, I do not have a another machine to determine the directory from.
Offline Installation of Packages
For machines with no Internet connection, packages may be installed by copying the package root directory (given by Pkg.dir()) from a machine with the same operating system and environment.
Pkg.add() does the following within the package root directory:
Adds the name of the package to REQUIRE.
Downloads the package to
.cache, then copies the package to the package root directory.
Recursively performs step 2 against all the packages listed in the package’s REQUIRE file.
Runs Pkg.build()
I've been having trouble downloading the shinyapps package on my windows computer. I've updated my versions of R and studio, tried the devtools download devtools::install_github('rstudio/shinyapps') and I've also tried the manual download of the shinyapps-master.zip (github.com/rstudio/shinyapps/archive/master.zip) and using install_local() all to no avail.
Here is the error I get with each method:
Installing shinyapps
"C:/Program Files/R/R-3.1.1/bin/i386/R" --vanilla CMD INSTALL \
"C:\Users\MyName\AppData\Local\Temp\Rtmpma2fl1\devtools10cc1745fe7\shinyapps-master" \
--library="C:/Program Files/R/R-3.1.1/library" --install-tests
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Error: Command failed (1)
After doing the excellent tutorial for shiny I would love to be able to use shinyapps.io but can't so far due to this. Any ideas? Much appreciated!
The app does not like the fact that R is installed in a directory that includes a space. I recommend reinstalling R to a location without a space, e.g. c:/R/.
I got a similar problem. I deleted the shinyapp folder first and then the file with that name. All my packages are saved in ~/Documents/R/win-library/3.1 folder on Windows 7 PC as I have not specified the lib folder. Then I installed the shinyapps package again using devtools::install_github('rstudio/shinyapps') command in R. HTH
I'm trying to install the development version of gWidgets2 in a WIndows XP system.
Unfortunately when I'm running
require(devtools)
install_github("gWidgets2", username="jverzani")
install_github("gWidgets2RGtk2", username="jverzani")
the tar.gz file is downloaded and not the zip windows version.
> building 'gWidgets2RGtk2_1.0.tar.gz'
So I downloaded manually the jverzani-gWidgets2-79fd592.zip file from https://github.com/jverzani/gWidgets2/downloads and I tried to install the package locally. But then I receive
> utils:::menuInstallLocal()
and the file is not installed.
The same happens with gWidgets2tcltk, gWidgetsWWW2, gWidgets2 and gWidgets2RGtk2.
Is there anybody who has tried to do the same ?
Thank you in advance
What is the difference between .tar.gz or .tgz files installed by R CMD install and install.packages()? I have made an example package with R CMD build, which I can currently install with R CMD install mypackage.tar.gz - and it works fine. I want to be able to install it through the install.packages() function (with a call like install.packages("mypackage.tar.gz",repos=NULL)). What additional steps do I need to take?
It depends on your OS. On Linux you can install your .tar.gz package with the command you specify. If you are on Mac OS X, you need to specify that you are installing from source package and not binary (see ?install.packages on a Mac). As Dirk said the .tgz packages are binary builds for Mac and you can build them on a Mac.
If you want to build the package for Windows see http://win-builder.r-project.org/, which is a web service for building binary packages from source.
If you are planning to submit your package to CRAN, but wan't to test is first see Rforge
I think the .tgz is the binary package on OS X, just like windows gets a binary .zip. Either one results from R CMD build.
So when you write "have made an example package with R CMD build, which I can currently install with R CMD install mypackage.tar.gz" you are inconsistent as the .tar.gz was the source and the result of the R CMD BUILD step. Start with the .tar.gz sources, make sure R CMD check and R CMD INSTALL work on them and then try R CMD binary.
Lastly, for install.packages() you need both the binary packages created by R CMD build --binary and a web-based repository containing file PACKAGES etc --- and as help(install.packages) says, see the R Installation and Administration manual for how to set up a repository.