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
# my "true community" (a census) | |
comm <- sample(as.factor(letters[1:5]), 1000, | |
prob=c(0.6,0.4,0.2,0.1,0.1), replace=TRUE) | |
# taking random samples from my community and calculating relative abundance | |
samps <- plyr::ldply(1:1000, function(x){ | |
set.seed(x) | |
tmp <- table(sample(comm, 10)) | |
tmp <- tmp/sum(tmp) | |
return(tmp) |
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
# RSelenium method to scrape citation counts from WOS | |
**Updates**: RSelenium package has switched some of the code around, causing breaking changes to this old gist. Web of Science has also changed their layout, causing breaking changes. The current code is a hacky patch to allow for some WoS interactivity and data acquistion. | |
### Currently set up to work with the RSelenium docker image | |
library(RSelenium) | |
library(plyr); library(dplyr) | |
library(RSelenium) |