Skip to content

Well, my time of not taking you seriously is coming to a middle.

License

Notifications You must be signed in to change notification settings

arcaravaggi/browncoat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

browncoat

A personal repo containing functions, notes, that sort of thing. A miscellany, if you will.

Demonstrations

Generate Random Sampling Points by Minimum Distance
The generation of random points separated by a minimum distance threshold. Includes polygon creation and displaying polygons and points on extracted Google maps.

Kernel Density Estimation (KDE)
Demonstrating how to construct a KDE map, apply thresholds and convert to a raster object.

Multi-csv import and organisation
Import multiple csv files from a directory and extract relevant information. This simple demo was written to answer a question frequently asked by students.

Web scraping
Scrape tables from a website, split columns and extract relevant data. This example uses data from the Pick and Go website and rugby Six Nations data between 2000-2017.

Uploaded scripts

bufferFrags.R
Calculate habitat fragmentation indices/stats for particular coordinates. From and by Greg Guerin.

cInt.R
Calculation of Confidence Intervals with varying critical values, given mean and standard deviation.

minmax.R
Calculate minimum and maximum variance based on n bootstrapping iterations, with thresholding.

multicsv.R
Import files from multiple sub(+)directories, with basic cleaning.

multiplot.R
Multiple plot function, from R Cookbook.

package.R
Simplified loading and installing of packages, from rbloggers.

rem_resample.R
Resample camera trap zone of detection metrics (r & theta) and calculate 95% confidence intervals.

secretsanta.R
Run a Secret Santa exchange from within R. Includes mail merge and send.

suntimes.R
Calculate sunrise and sunset for a given location at a given time of year.

theme_ac1.R
Custom ggplot theme for publication-quality figures.

Gists

For all Gists, click here

arrange_cols.R
(Re-)arrange columns of a dataframe.

autonoRm.R
Generate a set of autocorrelated random normal variates.

binRC.R
Reduce multiple columns to single binary vector.

coefplot.R
Plot regression coefficients, from r-statistics, by Achim Zeileis.

confNet.R
Function to create network data objects.

cor.test.R Function for pairwise correlations across a data frame

df_col_split.R
Split column into multiple based on spaces, extra characters, etc.

explodeR.R
Copy row duplicating data Xi times. By StackOverflow user, CPak.

euDist.R
Calculate Euclidean distance between groups of ecological point data.

extractCoords.R
Extract coordinates from SpatialPolygon object.

facetR2.R
Label ggplot facet plots with facet group name and R^2. From Stack Overflow.

ipak.R
Function to load a list of packages and install package if absent.

maxDup_NAs.R
Split data by focal column and remove duplicates from a span to columns, keeping the one with the most data. Adapted from akrun.

modOverlap.R
Metrics for quantifying the similarity among ecological niche models, from modtools.

multicsv_lst.R
Read multiple csv files from one directory.

multidf_to_csv.R
Export all active dataframes to named csv files.

power_analysis.R
Simple power aalysis in R.

presabsRas.R
Create raster of species presence/absence. Created by Amy Whitehead.

simpleCap.R
Capitalise the first letter of every word in a string, by stackoverflow user Andrie.

spLine.ld.R
Intersects SpatialLine and SpatialPolygon objects and produces total line length and density per polygon ID.

tnorm.R
Function for the truncation of a generated normal distribution (adapted rnorm).

tweetstorm.R
Create a series of related tweets from one text string, from emotiononthebrain.

update_migrate.R
Update to the latest version of R and migrate/update packages to new installation, from within the console.

veQ.R
Generate dispersion (including plot) and summary metrics for a given vector.

About

Well, my time of not taking you seriously is coming to a middle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages