Description Usage Arguments Examples
These functions provide the same purpose, to remove type annotation from any language object.
1 2 3 | removeTypes(x)
remove_types(x)
|
x |
R language object |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Function arguments can be annotated with types
f <- function(x = 1 ? numeric) {
x + 1
}
# The types can then be removed if needed
remove_types(f)
# A camelCase function is also available with the same behavior
removeTypes(f)
# They also works on quoted code
remove_types(quote(x + 1 ? numeric))
# Or expressions
remove_types(expression(x + 1 ? numeric))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.