utils_mutate_across {podcleaner}R Documentation

Mutate operation(s) in dataframe column(s)

Description

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

Usage

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

## Not run: 
  df <- data.frame(
    location = "glasgow", occupation = "wine merchant",
    stringsAsFactors = FALSE
  )
  utils_mutate_across(df, c("location", "occupation"), paste0, "!")

## End(Not run)

[Package podcleaner version 0.1.2 Index]