ViewPipeSteps
ViewPipeSteps copied to clipboard
If step can't be 'View'ed, it is skipped
In this case, using rvest::html_node()
I get
Error in View : cannot coerce class xml_node to a data.frame
This is a weakness of View
and is an 'polite' failure as it does not prevent data.frame tabs from being created for the following nodes.
Perhaps there is a way to use print()
to create something that View
can handle, although html_node() %>% print() %>% View()
doesn't work.
suppressPackageStartupMessages({
library(dplyr)
library(stringr)
library(rvest)
})
URL<-"https://en.wikipedia.org/wiki/Winter_Olympic_Games"
wiki_page_raw<-read_html(URL)
wiki_page_raw %>%
html_node(xpath="//*[@id='mw-content-text']/div/table[3]") %>%
View()
#> Error in as.data.frame.default(x): cannot coerce class ""xml_node"" to a data.frame