Description Usage Arguments Examples
Return DOM of a website as HTML
1 |
url |
A url or a local path. |
css |
a string containing one or more CSS selectors separated by commas. |
all |
logical. This controls whether |
timeout |
maximum time to wait for page to load and render, in seconds. |
filename |
A character string specifying a filename to store result |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
filename = tempfile(tmpdir = "~", fileext = ".html") # added space
rdom("https://en.wikipedia.org/wiki/Main_Page", filename = filename)
rdom(filename)
unlink(filename)
library("rvest")
stars <- "http://www.techstars.com/companies/stats/"
# doesn't work
html(stars) %>% html_node(".table75") %>% html_table()
# should work
rdom(stars) %>%
html_node(".table75") %>%
html_table()
# more efficient
stars %>% rdom(".table75") %>% html_table()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.