npi_flatten {npi}R Documentation

S3 method to flatten an npi_results object

Description

S3 method to flatten an npi_results object

Usage

npi_flatten(df, cols, key)

Arguments

df

A data frame containing the results of a call to npi_search.

cols

If non-NULL, only the named columns specified here will be be flattened and returned along with npi.

key

A quoted column name from df to use as a matching key. The default value is "npi".

Value

A data frame (tibble) with flattened list columns.

Examples

# Flatten all list columns
data(npis)
npi_flatten(npis)

# Only flatten specified columns
npi_flatten(npis, cols = c("basic", "identifiers"))

[Package npi version 0.2.0 Index]