import: This function imports/loads packages as in 'Python', i.e.,...

Description Usage Arguments Examples

View source: R/importar.R

Description

This function imports/loads packages as in 'Python', i.e., “import package as alias”

Usage

1
import(package, alias)

Arguments

package

Package name (unquoted).

alias

Alias (unquoted) for the package.

Examples

1
2
3
import(dplyr, d)
df <- data.frame(a=1:3, b=4:6)
df %>% d$filter(a == 2)

Example output

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

  a b
1 2 5

importar documentation built on May 2, 2019, 10:14 a.m.