muffle_vec_coerce: Muffle vector coercion warnings

Description Usage Arguments Examples

View source: R/vec-coerce.R

Description

Evaluate expr with all vector coercion warnings turned off. Other warnings are not muffled.

Usage

1

Arguments

expr

Expression to evaluate.

Examples

1
2
3
4
5
6
# Coercing incompatible factors is lossy because it returns a
# character vector that has lost the levels information. Use
# muffle_vec_coerce() to silence this kind of warning:
f1 <- factor("foo")
f2 <- factor("bar")
muffle_vec_coerce(vec_coerce(f1, f2))

lionel-/coercer documentation built on May 3, 2019, 8:59 p.m.