Skip to content

Instantly share code, notes, and snippets.

@niranjv
Last active August 8, 2017 20:00
Show Gist options
  • Save niranjv/861de3dac2515d35ac4dbc0868fe0e8c to your computer and use it in GitHub Desktop.
Save niranjv/861de3dac2515d35ac4dbc0868fe0e8c to your computer and use it in GitHub Desktop.
List contents of R package
# Use `ls` to view package contents
# Ref
# - https://stackoverflow.com/questions/12575098/to-see-all-the-content-not-just-objects-in-a-package-in-r
# Example for ISLR package, assuming it is installed
ls(pos="package:ISLR")
# To view only datasets in a package (results will open in a new tab):
data(package="ISLR")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment