2

I just compiled my very first R package, with my very first C++ snippets (thanks to Rcpp!). Now I want to test things, debug them, etc.

Problem is, I don't own a Mac. Some friends of mine have one, but I'm not sure, if their able to use my package "out-of-the-box". I have no experience with creating R packages so far, and what might and might not work.

How can I make a package, which works on a Mac and/or on Windows out-of-the box?

Thanks in advance, Marc

Marc
  • 238
  • 1
  • 9
  • 1
    you can use `ftp://win-builder.r-project.org` to build Windows binaries. I don't know of an *easy* way to cross-build MacOS binaries. What OS are you using?? – Ben Bolker May 15 '14 at 22:02
  • http://stackoverflow.com/questions/9760609/how-do-i-cross-compile-r-packages-for-macos-from-a-linux-environment – Ben Bolker May 15 '14 at 22:02
  • (this is not *quite* a duplicate since you asked about both MacOS and Windows. Pretty close, though.) – Ben Bolker May 15 '14 at 22:03
  • http://stackoverflow.com/questions/16745482/create-r-windows-binary-from-tar-gz-linux – Ben Bolker May 15 '14 at 22:04
  • Ubuntu 14, R-Studio 9.98.507 and R 3.0.2. Edit:Whoops, you're right! Thanks for the hint. *blush* – Marc May 15 '14 at 22:04
  • I think the linked questions here more or less answer your questions (googling for "windows R cross-compile" or "MacOS R cross-compile" bring up further mailing list threads, but I don't think there's very much additional useful information there.) – Ben Bolker May 15 '14 at 22:05
  • If you'll write this as an answer, I'll accept it. Thank you! :) – Marc May 15 '14 at 22:06
  • 2
    You may not want cross-compilation (which way too hard). What you may want it proper organization of your sources in a source package -- which is what CRAN does. Your friends and colleagues can then install from source. – Dirk Eddelbuettel May 15 '14 at 22:08
  • @Dirk: Not if the friends and colleagues haven't installed the tools for building from source (I know it's not that hard to install them, but for some users it really is a barrier ...) – Ben Bolker May 15 '14 at 22:09
  • 1
    (Copying from now-deleted answer): The reconciliation between your question and Dirk's point of view ("just build a source package") is that the answer to "can my friends/colleagues use my package out of the box?" is (a) yes, if they have compilation tools (which is really pretty easy; (b) yes, if you cross-build as discussed above; (c) otherwise no. – Ben Bolker May 15 '14 at 22:15
  • @BenBolker Exactly. This "barrier" is exactly my point: Some people know how to use R, but aren't familiar with R-Tools and stuff. I see both points, tho. – Marc May 15 '14 at 22:16

0 Answers0