4

I created an R package on Linux (and it is working on Linux), but I can't make the same package work on Windows.

What I tried to do (maybe it was a bit foolish) was to convert the tar.gz into a Zip file and to install it from the R GUI.

However, when I load the package library("myPackage") then I get the following message:

  Error in library("myPackage") :
     there is no package called 'myPackage'

Should I try to build the package directly from Windows with the R tools?

GSee
  • 48,880
  • 13
  • 125
  • 145
SRKX
  • 1,806
  • 1
  • 21
  • 42

2 Answers2

8

To build an R package on Windows, download the tools at
     http://cran.r-project.org/bin/windows/Rtools/
and follow the instructions at
     http://robjhyndman.com/researchtips/building-r-packages-for-windows/

GSee
  • 48,880
  • 13
  • 125
  • 145
Rob Hyndman
  • 30,301
  • 7
  • 73
  • 85
  • Thanks, you article is just GREAT. It explains everything very smoothly. Thanks for the link! – SRKX Jun 07 '10 at 01:31
3

Yes, you should make it directly on Windows. See the R Extensions manual and a number of tutorials on the web.

Marek
  • 49,472
  • 15
  • 99
  • 121
Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725