convertColTypes: Convert Column Types

View source: R/SurveyUtil.r

convertColTypesR Documentation

Convert Column Types

Description

Convert column types of a data frame to match another tibble with the same column names. This function helps to setup tibbles to use dplyr::bind_rows with

Usage

convertColTypes(df, df_to_match)

Arguments

df

The tibble whose columns are to be converted

df_to_match

The tibble with the column type definitions

Details

NOTE: the column names must be exactly the same between the two tibbles

Value

The df tibble with the column types converted to match the df_to_match tibble


nick-komick/iRecAnalysisPkg documentation built on July 7, 2024, 6:29 a.m.