Subset a data.frame and change column names.

map_data(x, map)

Arguments

x

data.frame

map

named vector. Map columns of x and subset.

Value

data.frame

Examples

if (FALSE) { x <- mtcars map_data(x, c( 'cyl' = 'Cylinders', 'hp' = 'Gross horsepower' )) }