typo-functions: Defining typos

Description Usage Arguments Details Value Examples

Description

Function used to create a typo and alert the user

Usage

1
2
3
.typo(.correct, .package = base, .typo_function = .typo_alert)

.typo_alert(.correct, .call)

Arguments

.correct

The correctly spelled function for which the wrapper is being defined

.package

The name of the package containing the correct function

.typo_function

Function to be used as an alert

.call

The incorrectly spelled call made by the user

Details

The .typo() function is used to define a typo within the context of the typo package. Without typo, mistakenly typed functions will cause an Error and not be evaluated; however with typo, the function is evaluated and a Warning is thrown.

Value

Wrapper function to call the correctly spelled function

Examples

1
2
3
nameS <- .typo(names)

.typo_alert("names","nameS(mtcars)")

MyKo101/typos documentation built on June 15, 2020, 4:51 a.m.