Created
November 5, 2015 19:59
-
-
Save amoeba/652bd2cdfc467a98914f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(rvest) | |
| url <- "http://access.afsc.noaa.gov/REEM/WebDietData/DietTable.php?NODC=8857041501&Year=2007&Region=GOA" | |
| page <- read_html(url) | |
| column_names <- page %>% html_nodes(".afscbody table tr:first-child td ") %>% html_text() | |
| column_names | |
| table_data <- page %>% html_nodes(".afscbody table tr:not(:first-child) td ") %>% html_text() | |
| table_data | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment