Awesome
straddin
Peek at objects with a keystroke.
As much as I like RStudio's Environment pane, sometimes I want to see the structure of objects not yet created, or intermediate objects in a pipe-chain, or perhaps the structure of a large object.
-
install package and restart RStudio
remotes::install_github('famuvie/straddin')
-
Define some key-binding for straddin
RStudio menu:
Tools:Addins:Browse Addins:Keyboard shorcuts...
.I use Alt+Shift+S/0/1/2/M/? for full structure, structure at level 0, 1 or 2, summary and help respectively.
-
highlight something
-
print structure
Example
tidyr::gather(mtcars, variable, value)
Highlighting the previous line and pressing Alt+Shift+S executes the following
str(tidyr::gather(mtcars, variable, value))