dputSelectedAddin | R Documentation |
RStudio Addin:
Runs dput()
on the selected code and inserts
it instead of the selection.
See `Details`
for how to set a key command.
dputSelectedAddin(selection = NULL, insert = TRUE, indentation = 0)
selection |
String of code. (Character) E.g. N.B. Mainly intended for testing the addin programmatically. |
insert |
Whether to insert the expectations via
N.B. Mainly intended for testing the addin programmatically. |
indentation |
Indentation of the selection. (Numeric) N.B. Mainly intended for testing the addin programmatically. |
Parses and evaluates the selected code string,
applies dput()
and
inserts the output instead of the selection.
After installing the package. Go to:
Tools >> Addins >> Browse Addins >> Keyboard Shortcuts
.
Find "dput() Selected"
and press its field under Shortcut
.
Press desired key command, e.g. Alt+D
.
Press Apply
.
Press Execute
.
Inserts the output of running
dput()
on the selected code.
Does not return anything.
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
Other addins:
assertCollectionAddin()
,
initializeGXSFunctionAddin()
,
initializeTestthatAddin()
,
insertExpectationsAddin()
,
navigateTestFileAddin()
,
wrapStringAddin()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.