View source: R/extension-utils.R
valid_pkgname | R Documentation |
Naming rule obtained from 'Writing R Extensions' manual.
The corresponding regular expression used for verifying the package name is "[[:alpha:]][[:alnum:]\.]*[[:alnum:]]"
.
For function names this is "((?:[[:alpha:]]|\.(?![0-9]))[[:alnum:]_\.]*)"
valid_pkgname(pkg) valid_funcname(func)
pkg |
string vector containing package names. Can be a vector of strings with size of at least 1. |
func |
string vector containing function names. Can be a vector of strings with size of at least 1. |
A named logical indicating whether the package name is valid.
make.names
, 'Writing R Extensions' manual.
Other developer functions:
crossref_description()
,
generic_implementations()
,
load_packages()
,
update_settings()
valid_pkgname("hgutils") # valid valid_pkgname("ggplot2") # valid valid_pkgname("pkg2.-1") # invalid valid_funcname(".hgutils") # valid valid_funcname("ggplot2") # valid valid_funcname(".2pkg") # invalid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.