knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Get objects from packages via aliases of packages and the $ operator.
The %as%
infix operator works in the way similar to Python's Import spam as ham
remotes::install_github("atusy/importas")
library(importas) # Define an alias of a package, # and access the object from the package via the alias graphics %as% gr gr$plot # A more R-like syntax is gr <- package(graphics) # Define aliases at once importas(ut = utils, st = stats) ut$str st$median
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.