validate: Functions that check the validty of values throughout the...

Description Usage Arguments Value Author(s) Examples

Description

These functions help identify mistakes in formatting before the create difficult-to-diagnose problems later.

Usage

1
2
validate_filename_output(filename, path, file_extension_expected = "out",
  underscore_count_expected = 4L)

Arguments

filename

The name of the file to be validated.

path

The location of the file to be validated.

file_extension_expected

The extension of the file. This defaults to "out", which corresponds to Mplus output.

underscore_count_expected

The number of underscores required in the name (not currently used).

Value

An invisible TRUE value if the filename is valid. Otherwise, an error is thrown.

Author(s)

Will Beasley

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(IalsaSynthesis) #Load the package into the current R session.
## Not run: 
path <- "./studies/eas"
good_name <- "u1_male_aehplus_muscle_noCog_hand_noCogSpec.out"
validate_filename_output(good_name, path)

bad_name <- "missing_something.outtttt"
validate_filename_output(bad_name, path)

## End(Not run)

IalsaSynthesis documentation built on May 2, 2019, 10:16 a.m.