tbl_replace_numeric: Replace numeric value in a tibble.

Description Usage Arguments Value Examples

Description

In a given tibble a numeric value can be replaced by another numeric value.

Usage

1
tbl_replace_numeric(tbl, value, replace_by)

Arguments

tbl

a tbl.

value

a numeric which is to be replaced from tbl.

replace_by

a numeric replacement for value.

Value

a tbl

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
set.seed(1234)
tbl <- tibble::tibble(x = c(letters[1:5] ,letters[1:5]),
                       y = sample(1:5, 10 ,replace = T),
                       z = sample(1:5, 10,replace = T))
 tbl %>% tbl_replace_numeric(2, 1000)
 tbl %>% tbl_replace_numeric(4, 1000)

## End(Not run)

cparsania/TidyWrappers documentation built on Feb. 6, 2022, 3:25 p.m.