Created
June 30, 2012 14:45
-
-
Save milktrader/3024051 to your computer and use it in GitHub Desktop.
Create R package from commandline prompts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[~] | |
✈ R --silent | |
> boo = function(x) x*8 | |
> boo(33) | |
[1] 264 | |
> package.skeleton('boo', name='qux') | |
Creating directories ... | |
Creating DESCRIPTION ... | |
Creating NAMESPACE ... | |
Creating Read-and-delete-me ... | |
Saving functions and data ... | |
Making help files ... | |
Done. | |
Further steps are described in './qux/Read-and-delete-me'. | |
> q() | |
Save workspace image? [y/n/c]: n | |
[~] | |
✈ cd qux/ | |
[qux] | |
✈ ls | |
DESCRIPTION NAMESPACE R Read-and-delete-me man | |
[qux] | |
✈ rm Read-and-delete-me | |
[qux] | |
✈ rm -rf man/ | |
[qux] | |
✈ ls | |
DESCRIPTION NAMESPACE R | |
[qux] | |
✈ .. | |
[~] | |
✈ R CMD INSTALL qux/ | |
* installing to library ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’ | |
* installing *source* package ‘qux’ ... | |
** R | |
** preparing package for lazy loading | |
** help | |
No man pages found in package ‘qux’ | |
*** installing help indices | |
** building package indices | |
** testing if installed package can be loaded | |
*** arch - i386 | |
*** arch - x86_64 | |
* DONE (qux) | |
[~] | |
✈ R --silent | |
> require(qux) | |
Loading required package: qux | |
> ls() | |
character(0) | |
> boo(7) | |
[1] 56 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment