Difference between revisions of "Template:R"
Jump to navigation
Jump to search
m |
m |
||
Line 38: | Line 38: | ||
− | </noinclude><code>{{#if:{{#pos:{{{1|}}}|()}}|[http://www.rdocumentation.org/packages/base/functions/{{#replace:{{{1}}}|()|}}{{#if: {{{2|}}}|{{{2}}}|{{#if: {{{3|}}}|{{{3}}}|{{{1}}}}}}}]|not a function}}</code> | + | </noinclude><code>{{#if:{{#pos:{{{1|}}}|()}}|[http://www.rdocumentation.org/packages/base/functions/{{#replace:{{{1}}}|()|}} {{#if: {{{2|}}}|{{{2}}}|{{#if: {{{3|}}}|{{{3}}}|{{{1}}}}}}}]|not a function}}</code> |
Revision as of 17:36, 16 January 2015
Template to link R commands and packages to their respective information sources.
If the first parameter does not end in (), it is assumed to be a package. Otherwise, it is assumed to be a function in base R.
If the second parameter is empty, the package link on rdocumentation.org is created. Otherwise the function link is created.
If a third parameter is present, that will be the linked text.
Test cases:
mean()
not a function
not a function
not a function
[http://www.rdocumentation.org/packages/base/functions/{{{1}}}
- if second or third parameter is present, that will be the linked text.
{{{1}}}
]
- no: it's a package
not a function