write_test: Write test for an R function

View source: R/write_test.R

write_testR Documentation

Write test for an R function

Description

This function reads an R function from a file and generates a test file with documentation.

Usage

write_test(file)

Arguments

file

The file path of the R function.

Value

If the input is a character string, the function returns the generated output without creating a test file. Otherwise, it creates a test file and returns the file name.

Examples

## Not run: 
# Write test for an R function
write_test("path/to/file.R")

## End(Not run)

TheOpenAIR documentation built on April 27, 2023, 5:10 p.m.