maxchar: Check max char length of data.frame vectors

View source: R/tools.R

maxcharR Documentation

Check max char length of data.frame vectors

Description

Stata requires us to provide the maximum size of a charactervector as every row is stored in a bit region of this size.

Usage

maxchar(x)

Arguments

x

vector of data frame

Details

Ex: If the max chars size is four, _ is no character in this vector: 1. row: four 3. row: one_ 4. row: ____

If a character vector contains only missings or is empty, we will assign it a value of one, since Stata otherwise cannot handle what we write.


sjewo/readstata13 documentation built on Aug. 25, 2023, 7:45 a.m.