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
#Set Working Directory and Options | |
setwd("~/Dropbox/Blocks") | |
options(scipen=999) | |
#Load Packages | |
packages <- c("R.utils","data.table","RCurl","bit64","maptools","rgdal","rgeos") | |
for (package in packages){ | |
if(paste(package) %in% rownames(installed.packages()) == FALSE) {install.packages(paste(package))} | |
library(paste(package),character.only=TRUE) | |
} |
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
file_invited <- as.data.frame(ReadBib("invited.bib")) | |
file_invited$title <- gsub("\\{|\\}","",file_invited$title)# Remove {} | |
file_invited$address <- gsub("\\{|\\}","",file_invited$address)# Remove {} | |
dates <- unlist(unique(file_invited$year))[order(unlist(unique(file_invited$year)),decreasing = TRUE)] | |
#Prints references - slightly different format as converted to data frame for formating | |
for (date in dates) { | |
cat(paste0("##",date),"\n") | |
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
file_journals <- ReadBib("journals.bib") | |
dates <- unlist(unique(file_journals$year))[order(unlist(unique(file_journals$year)),decreasing = TRUE)] | |
#Prints recerences | |
for (date in dates) { | |
cat(paste0("##",date),"\n") | |
print(file_journals[list(year=date)],.opts = list(style="markdown",bib.style ="authoryear" ,max.names =10,dashed=FALSE)) | |
cat("\n") | |
} |
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
#Inserts a download link to the PDF CV | |
conn<-file("./_site/cv.html") | |
text <- readLines(conn) | |
close(conn) | |
d_link <- "<li><i class='fa fa-download' aria-hidden='true'></i><a href='cv_Alex_Singleton.pdf'> Download CV (pdf)</a></li>" | |
text_new <- c(text[1:290],d_link,text[291:length(text)]) | |
write(text_new, file = "./_site/cv.html") |
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
render("cv.Rmd", "pdf_document",output_file="./_site/cv_Alex_Singleton.pdf") |
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
name: "Alex_Singleton" | |
navbar: | |
title: "Alex Singleton" | |
left: | |
- text: "Publications" | |
icon: fa-book fa-2x | |
href: publications.html | |
- text: "CV" | |
icon: fa-file fa-2x | |
href: cv.html |
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
tool_exec <- function(in_params, out_params) { | |
# the first input parameter, as a character vector | |
input.dataset <- in_params[[1]] | |
# alternatively, can access by the parameter name: | |
input.dataset <- in_params$input_dataset | |
print(input.dataset) | |
# ... do analysis steps | |
out_params[[1]] <- results.dataset |
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
#Install the arcgisbinding package | |
install.packages("https://4326.us/R/bin/windows/contrib/3.2/arcgisbinding_1.0.0.111.zip", repos=NULL, method="libcurl") | |
#Install older versions of the TwitteR and httr packages | |
install.packages("https://cran.r-project.org/src/contrib/Archive/twitteR/twitteR_1.1.8.tar.gz", repos=NULL, method="libcurl") | |
install.packages("https://cran.r-project.org/src/contrib/Archive/httr/httr_0.6.0.tar.gz", repos=NULL, method="libcurl") | |
#Load the arcgisbinding package and check license | |
library(arcgisbinding) | |
arc.check_product() |