geo_normalize.data.frame: Normalize with geographic codes for a level after it has been...

View source: R/geography.r

geo_normalize.data.frameR Documentation

Normalize with geographic codes for a level after it has been loaded by the database.

Description

Some database driver coerce column data to another type (char to int) which is can cause problems with some code with mixed alphanumeric and numeric codes (sometimes to int, sometimes to char), cast to int drop zerofilled codes making the code unuseable.

Usage

## S3 method for class 'data.frame'
geo_normalize(data, columns = NULL, levels = NULL, ...)

Arguments

data

data to normalize

columns

columns to normalize, named vector with level name as name for each column if levels is null

levels

corresponding level for each column. if NULL will use names of 'columns' parameter

...

extra parameters for specific methods

Details

This function try to find a normalizer function associated with provided levels. Normalizer functions are defined with the geographic levels using platform_geographic_levels()


cturbelin/ifnBase documentation built on Nov. 5, 2023, 12:54 p.m.