html_attrs_dfr | R Documentation |
Convert collection of html nodes into data frame
html_attrs_dfr(
x,
attrs = NULL,
trim = FALSE,
defaults = NA_character_,
add_text = TRUE
)
x |
|
attrs |
character vector of attribute names. If missing, all attributes will be used |
trim |
if |
defaults |
character vector of default values to be passed to |
add_text |
if |
data frame with one row per xml node, consisting of an html_text column with text and additional columns with attributes
library(polite)
library(rvest)
bow("https://en.wikipedia.org/wiki/List_of_cognitive_biases") %>%
scrape() %>%
html_nodes("tr td:nth-child(1) a") %>%
html_attrs_dfr()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.