Learn R Programming

COVID19 (version 2.0.3)

map_data: Map Data

Description

Subset a data.frame and change column names.

Usage

map_data(x, map)

Arguments

x

data.frame

map

named vector. Map columns of x and subset.

Value

data.frame

Examples

Run this code
# NOT RUN {
x <- mtcars

map_data(x, c(
'cyl' = 'Cylinders',
'hp'  = 'Gross horsepower'
))

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab