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
#' Retrieve number of citations of a paper in Google Scholar | |
#' | |
#' This function retrieves the number of citations of a given paper in Google Scholar. | |
#' | |
#' @param user character vector. The user ID in Google Scholar Citations. Obtain from author's profile website in google scholar (http://scholar.google.com/citations?user=...) | |
#' @param paper character vector. The paper ID in Google Scholar Citations. Copy from publication list in author's profile website. | |
#' @author F. Rodriguez-Sanchez | |
#' @examples | |
#' ncites_scholar(user="B7vSqZsAAAAJ", paper="d1gkVwhDpl0C") | |
#' |
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
# Here are a few methods for getting text from PDF files. Do read through | |
# the instructions carefully! NOte that this code is written for Windows 7, | |
# slight adjustments may be needed for other OSs | |
# Tell R what folder contains your 1000s of PDFs | |
dest <- "G:/somehere/with/many/PDFs" | |
# make a vector of PDF file names | |
myfiles <- list.files(path = dest, pattern = "pdf", full.names = TRUE) |
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
# Joseph R. Mihaljevic | |
# July 2013 | |
# (Partial) Bayesian analysis of variance, accounting for heteroscedasticity | |
# Generate some artificial data: | |
# Normally distributed groups, but heteroscedastic | |
a <- rnorm(25, mean=8, sd=10) | |
b <- rnorm(50, mean=5, sd=2) | |
c <- rnorm(25, mean=3, sd=.1) | |
d <- rnorm(25, mean=11, sd=3) | |
e <- rnorm(50, mean=13, sd=2) |
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
## Function to use GDAL to project coordinate reference system | |
# See http://www.gdal.org/gdalwarp.html for additional details | |
# `resampling` can be 'near' (nearest neighbour), 'bilinear', 'cubic', or | |
# 'lanczos' (Lanczos windowed sinc resampling). | |
# `extent` should be a bbox object or a vector of c(xmin, ymin, xmax, ymax) | |
# `of` is the output format (use GDAL short name as given by the name field of | |
# gdalDrivers(), or at http://www.gdal.org/formats_list.html) | |
# `extension` is the output extension corresponding to the primary file | |
# `ot` is the output type (see http://www.gdal.org/gdal_translate.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
#' Calculate total cover per species in vegetation transects | |
#' | |
#' Calculate total cover per species in each transect, layer within transect, etc. | |
#' Optionally, the function can also calculate length of bare ground (as ground not covered | |
#' by any plant species). | |
#' | |
#' @export | |
#' @author F Rodriguez-Sanchez | |
#' @importFrom plyr ddply | |
#' @importFrom gtools odd even |
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
--- | |
title: "A few methods for making tables in rmarkdown" | |
output: html_document | |
--- | |
Updates: | |
Packages that have appeared since my original look into this, and seem great: | |
https://github.com/yihui/printr |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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(dismo) | |
# Get elevation data from the internet for specified coordinates | |
elev <- getData("SRTM", download=T, lon=-76.6, lat=18.1) | |
# Specify desired extent | |
ext <- c(-76.68, -76.65, 18.08, 18.11) | |
ext2 <- c(-76.675, -76.655, 18.088, 18.10) # for plotting | |
OlderNewer