View source: R/stringToPackage.r
This function converts the string to one of the following objects:
PackageCran:
pkg
is a single string without any special characters except dots.
PackageLocal:
pkg
points to an existing directory.
Path to local directory starting with “./”, “../”, “~/”, “/” or specifically under windows “.\”, “..\”, “X:\”.
The path can also point to a file of the type “tar”, “zip”, “tar.gz”, “tar.bz2”, “tgz” or “tbz”.
PackageGit:
pkg
starts with “http(s)://” or “git@” and ends with “.git”.
Additionally a reference (branch, tag or SHA reference) can be specified with the prefix “@”.
If the package resides in a subdirectory it can be specified with the prefix “/”.
Example: “http://gitserver.domain/repo.git/subfolder@branch”
PackageGitHub:
pkg
matches the pattern “[user]/[repo]”.
Additional prefixes can be given as for GitPackage (see above).
Example: “user/repo/subfolder@branch”
PackageGitLab:
pkg
matches the pattern “gitlab::[user]/[repo]” or “gitlab::(host):[user]/[repo]”.
Additional prefixes can be given as for GitPackage (see above).
Example: “gitlab::(mygitlab.com):user/repo/subfolder@branch”
1 | stringToPackage(pkg)
|
pkg |
[ |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.