Description Usage Arguments Functions Examples
Testing Rd types
These provide methods for testing if an object is valid.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | is_Rd_string(x, tags = NULL, strict = FALSE, reason = TRUE)
are_Rd_strings(x, tags = NULL, strict = FALSE)
is_Rd_tag(x, tags = NULL, strict = FALSE, reason = TRUE)
are_Rd_tags(x, tags = NULL, strict = FALSE)
is_Rd(x, strict = FALSE)
is_valid_Rd_list(x, tags = NULL, strict = FALSE,
deep = !isTRUE(strict) || !missing(tags))
is_valid_Rd_object(x, tags = NULL, strict = FALSE,
deep = !isTRUE(strict) || !missing(tags))
|
x |
object to test |
tags |
the type of tag(s) allowed in the |
strict |
if the class must be set. A value of NA indicates that the first level need not be classed but all subsequent must be. |
reason |
should the reason for failure be included.
Used in |
deep |
should contained elements also be checked for validity? |
is_Rd_string
: test if object is a valid Rd string type.
are_Rd_strings
: Vector version of is_Rd_string.
is_Rd_tag
: Check if a list is a valid Rd_tag
object.
are_Rd_tags
: Vector version of is_Rd_tag
is_Rd
: check if a list is an Rd container object.
is_valid_Rd_list
: Check that an object is a valid Rd list,
an Rd_tag
or Rd
, but not an Rd_string
is_valid_Rd_object
: Check that an object is valid
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | is_Rd_string('nope')
is_Rd_string(structure('Valid but not strict', Rd_tag='TEXT'))
is_Rd_string(structure('Valid but not strict', Rd_tag='TEXT'), strict=TRUE)
is_Rd_string(Rd_text('Valid and strict'), strict=TRUE)
are_Rd_strings(Rd( Rd_alias('example'), '\n'
, Rd_name('example'), '\n'
))
is_Rd_tag(Rd('text'))
is_Rd_tag(Rd_alias('alias'))
are_Rd_tags(Rd( Rd_alias('example'), '\n'
, Rd_name('example'), '\n'
))
is_Rd(list())
is_Rd(list(), strict=TRUE)
is_Rd(Rd(), strict=TRUE)
is_valid_Rd_list(Rd_name('name'))
is_valid_Rd_list(Rd('text'))
is_valid_Rd_list(Rd_text('text'))
is_valid_Rd_object(Rd_name('name'))
is_valid_Rd_object(Rd('text'))
is_valid_Rd_object(Rd_text('text'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.