Posts

Showing posts with the label r-base

Get help file description in R as an object

Image
Clash Royale CLAN TAG #URR8PPP Get help file description in R as an object I'm trying to build a shiny app that manipulates some base R datasets, like datasets::airmiles . I'd like to display somewhere within that app the description of this dataset. For instance, ?datasets::airmiles yields - datasets::airmiles ?datasets::airmiles Is there any way I can extract the description string? e.g. in this case, it would be the string 'The revenue passenger miles flown by commercial airlines in the United States for each year from 1937 to 1960.' I have tried - x <- help('airmiles') str(x) # 'help_files_with_topic' chr "C:/Program Files/R/R-3.5.1/library/datasets/help/airmiles" # - attr(*, "call")= language help(topic = "airmiles") # - attr(*, "topic")= chr "airmiles" # - attr(*, "tried_all_packages")= logi FALSE # - attr(*, "type")= chr "html" But x does not contain the descripti...