Nothing
skip_scraping <- function(){
if(!requireNamespace("rvest", quietly = TRUE) ||
!identical(Sys.getenv("LOCAL"), "true"))
skip("Not in local")
}
extract_roles <- function(tag){
}
test_that("roles_get is updated with CRediT roles", {
skip_scraping()
html <- rvest::read_html("https://credit.niso.org/")
html <- rvest::html_elements(html, "p")
html <- rvest::html_elements(html, "a")
roles_index <- rvest::html_attr(html, "href")
roles_index <- grep(pattern = "contributor-roles", x = roles_index)
roles <- html[roles_index]
roles <- rvest::html_text(roles)
roles <- gsub("–", "-", roles)
expect_equal(sort(roles), sort(roles_get()))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.