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.


readstata13 documentation built on March 7, 2023, 6:12 p.m.