Function used to create a typo and alert the user

.typo(.correct, .package = base, .typo_function = .typo_alert)

.typo_alert(.correct, .call)



The correctly spelled function for which the wrapper is being defined


The name of the package containing the correct function


Function to be used as an alert


The incorrectly spelled call made by the user


Wrapper function to call the correctly spelled function


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.


nameS <- .typo(names) .typo_alert("names","nameS(mtcars)")
#> Warning: Typo of "names()" detected in "nameS(mtcars)()"