colClasses: Expand template into 'read.table's 'colClasses' argument

Description Usage Arguments Details Value Examples

Description

Expand template into read.tables colClasses argument

Usage

1

Arguments

fmt

Format string to be expanded and then used as the colClasses argument to read.table.

Details

The following format letters are available:

c "character"
i "integer"
l "logical"
n "numeric"
N "NULL"
r "raw"
x "complex"

The digits say how many times the expansion of the character should be included in the result.

Value

A vector that can be used as the colClasses argument to read.table.

Examples

1
2
stopifnot(colClasses(c("N 2 c i n")) ==
    c("NULL", "character", "character", "integer", "numeric"))

cbaumbach/miscFun documentation built on May 13, 2019, 1:48 p.m.