safe_arg | R Documentation |
If the list contains an item of the given name, the return value will be that item coerced to the given type. For character strings, single quotes will be doubled so that the object is safe for use in SQL queries, provided that strings are enclosed in single quotes in the query.
safe_arg(x, name, type, scalar = TRUE, nullValue = NULL)
x |
list object with names |
name |
unquoted object name |
type |
unquoted type name, one of "character", "integer", "logical", "numeric", "list" or abbreviation thereof. |
scalar |
if TRUE (the default) return a vector of length 1,
dropping any additional items. Otherwise, return a vector with the
same length as the item from |
nullValue |
if the item is not present, return this value. default: NULL |
If there is no item with the given name in x
,
then return nullValue
.
John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.