Learn R Programming

mark (version 0.8.1)

import: Import

Description

Import a single function from a package

Usage

import(pkg, fun, overwrite = FALSE)

Value

None, called for side effects

Arguments

pkg

String, name of the package

fun

String, fun name of the function

overwrite

Logical, if TRUE and fun is also found in the current environment, will overwrite assignment

Examples

Run this code
# assigns `add` -- test with caution
import("magrittr", "add")

Run the code above in your browser using DataLab