Skip to content

RStudio addin for printing the structure of a highlighted object

Notifications You must be signed in to change notification settings

famuvie/straddin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

  1. install package and restart RStudio

    remotes::install_github('famuvie/straddin')
  2. 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.

  3. highlight something

  4. 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))

About

RStudio addin for printing the structure of a highlighted object

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages