Learn R Programming

pcutils (version 0.2.8)

squash: Squash one column in a data.frame using other columns as id.

Description

Squash one column in a data.frame using other columns as id.

Usage

squash(df, column, split = ",")

Value

data.frame

Arguments

df

data.frame

column

column name, not numeric position

split

split string

Examples

Run this code
df <- data.frame(a = c(1:2, 1:2), b = letters[1:4])
squash(df, "b", ",")

Run the code above in your browser using DataLab