knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) library(importAs)
This package helps mimic the idiomatic python importing of packages such as
import dplyr as d
In order to mimic this as closely as possible, the function importAs
takes a
package name and a (short?) name for that and creates a linkage. Helpful information
is provided when printing and within the RStudio Environment pane
importAs(dplyr, d) ## or ## dplyr %importAs% d d
d::filter(mtcars, cyl == 4, am == 1)
For full details, see the vignette 'namespace-shorthands'.
You can install the development version of importAs
with
## install.packages("devtools") devtools::install_github("jonocarroll/importAs")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.