Skip to content

install own package ?

2 messages · Christian Schulz, Marc Schwartz

#
what happens here:

 > install.packages("/Users/hoffmann/R/cwhmisc_4.0.tar.gz",repos = NULL)
Error: file '/Users/hoffmann/R/cwhmisc_4.0.tar.gz' is not an OS X binary 
package

 > sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] C

attached base packages:
  [1] tools     tcltk     stats4    splines   parallel  datasets compiler
  [8] graphics  grDevices stats     grid      utils     methods base

other attached packages:
  [1] survival_2.36-14  spatial_7.3-3     rpart_3.1-53 nnet_7.3-1
  [5] nlme_3.1-104      mgcv_1.7-18       foreign_0.8-50 codetools_0.2-8
  [9] cluster_1.14.2    class_7.3-3       boot_1.3-4 Matrix_1.0-6
[13] MASS_7.3-18       KernSmooth_2.23-7 cwhmisc_3.0 lattice_0.20-6
 >

The .tar.gz has been generated by R CMD build, and is a source package, 
as suggested in the help.

TIA

Christian
#
On Nov 14, 2012, at 11:43 AM, Christian Hoffmann <c-w.hoffmann at sunrise.ch> wrote:

            
If you are using the CRAN OSX R binary, the default package type is:
[1] "mac.binary.leopard"

which is referenced in ?install.packages. It is looking for a binary version of your package, rather than a source package.

You need to use:

  install.packages("/Users/hoffmann/R/cwhmisc_4.0.tar.gz", 
                    repos = NULL, type = "source")

Regards,

Marc Schwartz