get_nchar: Calculate element lengths from a 'data.frame'

View source: R/get_nchar.R

get_ncharR Documentation

Calculate element lengths from a data.frame

Description

This function calculates the length of every element within a data frame for later use to map Postgres field types when writing to the database.

Usage

get_nchar(input, export = FALSE, path = NULL)

Arguments

input

a data.frame or list of data frames

export

a logical option export the result as an binary file

path

a file path option to specify the write location of the binary file

Details

The output for the specified summary statistic is based on the nchar() function. NOTE: that nchar() counts the literal length of an element or the element coerced to a character. See nchar().

Value

returns a data.frame or list of data frames with rows being the input columns and respective summary statistics and classes for each column

Examples

data(iris)
get_nchar(iris)


eugejoh/pgtools documentation built on Dec. 11, 2022, 4:29 p.m.