Created
January 27, 2012 19:02
-
-
Save sckott/1690353 to your computer and use it in GitHub Desktop.
Demo of using rnfa R package to scrape trait data - in this example for receptacle traits.
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
# A web page with taxa names you want to get trait data from | |
pg1 <- 'http://www.efloras.org/browse.aspx?flora_id=1&start_taxon_id=10074&page=1' | |
# Get the daughter URLs from the taxa on the page, using doMC to speed things up | |
urls <- getdaughterURLs(pg1, cores=TRUE, no_cores=2) | |
|======================================================================================================| 100% | |
# Get the receptacle trait state for the taxa | |
ldply(urls, receptacle, .progress='text') | |
|======================================================================================================| 100% | |
V1 V2 | |
1 Acamptopappus epaleate | |
2 Acanthospermum paleate | |
3 Achillea paleate | |
4 Achyrachaena paleate | |
5 Acmella paleate | |
6 Acourtia paleate | |
7 Acroptilon epaleate | |
8 Adenocaulon epaleate | |
9 Adenophyllum epaleate | |
10 Ageratina epaleate | |
11 Ageratum epaleate | |
12 Agnorhiza paleate | |
13 Agoseris paleate | |
14 Almutaster epaleate | |
15 Amauriopsis epaleate | |
16 Amberboa epaleate | |
17 Amblyolepis epaleate | |
18 Amblyopappus epaleate | |
19 Ambrosia not found | |
20 Ampelaster epaleate | |
21 Amphiachyris epaleate | |
22 Amphipappus epaleate | |
----#RESULTS CUT OFF FOR BREVITY#---- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment