utils_mutate_across: Mutate operation(s) in dataframe column(s)

Description Usage Arguments Value Examples

Description

Applies provided function across specified column(s) in provided dataframe.

Usage

1
utils_mutate_across(df, columns, fun, ...)

Arguments

df

A dataframe.

columns

Vector of expression(s) or character string(s) specifying the columns to apply the function below to in the provided dataframe.

fun

Function to execute provided as an expression.

...

Argument(s) to be passed to the function above for execution.

Value

A dataframe.

Examples

1
2
3
4
5
6
7
8
## Not run: 
  df <- data.frame(
    location = "glasgow", occupation = "wine merchant",
    stringsAsFactors = FALSE
  )
  utils_mutate_across(df, c("location", "occupation"), paste0, "!")

## End(Not run)

podcleaner documentation built on Jan. 12, 2022, 1:06 a.m.