Description Usage Arguments Details See Also Examples
View source: R/email_authors.R
Invokes utils::browseURL("mailto://[author emails]") for
a specified project, or for the currently open project if project is
left as NULL.
1 2 3 4 5 | email_authors(
project = NULL,
browser = getOption("browser"),
encodeIfNeeded = FALSE
)
|
project |
Project |
browser, encodeIfNeeded |
See |
The success of this function depends on the platform and the specified
browser. See the Details and URL schemes sections of
utils::browseURL().
If project = NULL, the function selects the project in the
projects() table whose path is equal to
rstudioapi::getActiveProject().
utils::browseURL();
rstudioapi::getActiveProject() for information on
browser and encodeIfNeeded arguments.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Wrapped in if (interactive()) because this function is interactive by nature.
if (interactive()) {
# If you have a projects() project open, just run it:
email_authors()
# Otherwise, specify a project:
###########################################################################
# Setup
old_home <- Sys.getenv("HOME")
old_ppath <- Sys.getenv("PROJECTS_FOLDER_PATH")
temp_dir <- tempfile("dir")
dir.create(temp_dir)
Sys.unsetenv("PROJECTS_FOLDER_PATH")
Sys.setenv(HOME = temp_dir)
setup_projects(path = temp_dir)
new_author("Rhonda", "Rondale", email = "ronda.rondale@co.uk")
new_author("Betty", "Betts", email = "betty@co.uk")
new_project("Inventing the Ring of Power", authors = c("Betty", "Ron"))
###########################################################################
email_authors("Ring of Power")
###########################################################################
# Cleanup (or just restart R)
Sys.setenv(HOME = old_home, PROJECTS_FOLDER_PATH = old_ppath)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.