transform.tbl_df: Add new variables to a data_frame

View source: R/transforms_fill.R

transform.tbl_dfR Documentation

Add new variables to a data_frame

Description

Add new variables to a data_frame

Usage

## S3 method for class 'tbl_df'
transform(.data, ...)

Arguments

.data

The data_frame object to apply the transformation to

...

Name-value pairs of expressions. Use NULL to drop a variable.

Details

This function provides a wrapper around dplyr::mutate. It implements the base::transform generic for data_frame objects.

Value

A copy of .data with the transformed columns

Examples

library(dplyr)
CO2 %>% as_data_frame %>% transform(newType=Type)

qPharmetra/PMDatR documentation built on April 7, 2024, 5:42 p.m.