Last chance! 50% off unlimited learning
Sale ends in
Rstudio addins to examine highlighted code / object. It can be very useful to bind these addins as outlined in https://github.com/brry/rskey#rstudio-addins-for-keyboard-shortcuts
str_addin(
obj = selectobject(),
use_glimpse = getOption("rskey_glimpse", FALSE)
)head_addin(obj = selectobject())
tail_addin(obj = selectobject())
View_addin(obj = selectobject())
funSource_addin(obj = selectobject(eval = FALSE))
summary_addin(obj = selectobject())
dim_addin(obj = selectobject())
class_addin(obj = selectobject())
plot_addin(obj = selectobject())
hist_addin(obj = selectobject())
unique_addin(obj = selectobject())
Output of the respective functions
List containing object
(some R object) fullcode
(code, objectname, expression) and code
(potentially truncated version).
For funSource_addin, only the function name should be highlighted.
DEFAULT: Rstudio addin selected code from selectobject
Logical: use pillar::glimpse
instead of
base::str
? Can be set to TRUE with
options(rskey_glimpse=TRUE)
. To set permananently, use:
cat("options(rskey_glimpse=TRUE)\n", file="~/.Rprofile", append=TRUE)
.
DEFAULT: getOption("rskey_glimpse", FALSE)
Berry Boessenkool, berry-b@gmx.de, May 2017
selectobject
,
berryFunctions::funSource
,
https://github.com/daattali/addinslist#readme
# Go to Addins - browse Addins - Keyboard shortcuts - map commands as desired
# or use setKeyboardBindings()
# highlight objects or code (examples below), then press keyboard shortcut
iris
iris$Sepal.Length + 10
Run the code above in your browser using DataLab