.check_fmt_string {cards}R Documentation

Check 'xx' Format Structure

Description

A function that checks a single string for consistency. String must begin with 'x' and only consist of x's, a single period or none, and may end with a percent symbol.

If string is consistent, TRUE is returned. Otherwise an error.

Usage

.check_fmt_string(x, variable, stat_name)

Arguments

x

(string)
string to check

variable

(character)
the variable whose statistic is to be formatted

stat_name

(character)
the name of the statistic that is to be formatted

Value

a logical

Examples

cards:::.check_fmt_string("xx.x") # TRUE
cards:::.check_fmt_string("xx.x%") # TRUE

[Package cards version 0.2.2 Index]