Skip to content

Name data viewer inside RStudio #6

Open
@ghost

Description

You want to assign custom names to several datasets you are inspecting in the data viewers.

For example,

View(starwars)
View(storms)
View(smiths)

Inside RStudio, those commands open R's data viewer with default names:

screen shot 2018-12-05 at 4 01 42 pm

Solution {-}

Option 1
View(starwars, "starwars from dplyr")
View(storms, "storms from dplyr")
View(smiths, "smiths from tidyr")
Option 2
starwars %>% 
  View("starwars from dplyr")
storms %>% 
  View("storms from dplyr")
smiths %>% 
  View("smiths from tidyr")

screen shot 2018-12-05 at 4 06 28 pm

Discussion {-}

Inside View() you insert a R object and then the title for the data viewer. This is really unnecessary with a few datasets, but when inspecting more than 5 datasets, this comes in handy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions