This file contains 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(bipartite) | |
# make some example networks | |
mat_list <- list() | |
for(i in 1:512){ | |
mat_list[[i]] <- matrix(ncol = 10, nrow = 10, | |
sample(c(0,1), 100, replace = T)) | |
} | |
# now do all the calculations at once (depending on your computers ability) |
This file contains 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
#### Header #### | |
## Project: NA | |
## Script purpose: Get all the species of bats with GBIF records from Malaysia, | |
## Indonesia and Brunei | |
## Date: | |
## Author: Dave Hemprich-Bennett (hemprich.bennett@gmail.com) | |
## Notes | |
################################################## | |
# Code repurposed from the fantastic lesson at https://ourcodingclub.github.io/2016/01/01/data-synthesis.html |
This file contains 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(googledrive) | |
library(dplyr) | |
# Make a directory for todays date | |
date <- as.character(Sys.Date()) | |
# Set the location for where the docs should be saved | |
outdir <- paste0("~/Dropbox/work/google_docs_backups/", date) | |
if (!dir.exists(outdir)) { |
This file contains 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
##Wikipedia querying from Noam Ross https://gist.github.com/noamross/88a51bb880f18da88e4b259eefdefe87 | |
library(tidyverse) | |
library(xml2) | |
library(rvest) | |
library(WikipediR) | |
library(urltools) | |
library(stringr) |