Skip to content

Instantly share code, notes, and snippets.

View maurolepore's full-sized avatar

Mauro Lepore maurolepore

View GitHub Profile
C F
-10 °C 14.0 °F
-9 °C 15.8 °F
-8 °C 17.6 °F
-7 °C 19.4 °F
-6 °C 21.2 °F
-5 °C 23.0 °F
-4 °C 24.8 °F
-3 °C 26.6 °F

Inspired by https://rickpackblog.wordpress.com/

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':

https://github.com/forestgeo/ttt/issues/33 Author: Gabriel Arellano gabriel.arellano.torres@gmail.com

# A general function to calculate distances in a n-dimensional toroid:
dist_in_torus <- function(x, lower = rep(-Inf, ncol(x)), upper = rep(Inf, ncol(x)))
{
	# x: the matrix with the coordinates of the points
	# lower and upper: the minimum and maximum possible values of the coordinates along each dimension
install_github("rstudio/rmarkdown")
install.packages(
  'knitr', 
  repos = c('https://xran.yihui.name', 'https://cran.rstudio.org')
)
devtools::install_github(
  "r-lib/pkgdown@c82b36e535a3f7c93fed95d738997620f8752cc3"
)
@maurolepore
maurolepore / cat_col_types.md
Created March 12, 2018 18:50
Help to create a list for the argument `col_types` of [readr::read_csv()].
#' Help to create a list for the argument `col_types` of [readr::read_csv()].
#' @noRd
cat_col_types <- function(x) {
  types <- purrr::map(x, class) %>%
    tibble::enframe() %>%
    tidyr::unnest() %>%
    dplyr::mutate(
      type = dplyr::case_when(
 value == "character" ~ "c",

Please distribute widely and bring to attention of promising candidates!

Position Announcement

Marine Biology Technician Smithsonian Marine Global Earth Observatory (MarineGEO)

The Smithsonian Institution seeks an energetic, field-oriented marine biologist to support the Marine Global Earth Observatory (MarineGEO), a growing network of partners collaborating to understand how coastal ecosystems work and how to keep them working in a changing ocean. The partnership is coordinated by the Smithsonian’s Tennenbaum Marine Observatories Network (TMON) and applies standardized observations and coordinated experiments to long-term research on biodiversity and functioning in shallow waters. The network includes the Smithsonian’s field facilities in Maryland (Smithsonian Environmental Research Center), Florida (Smithsonian Marine Station), Belize (Carrie Bow Cay Field Station), and Panama (Smithsonian Tropical Research Institute, Bocas del Toro Station), and a growing list of partner institutions.

We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 10 columns, instead of 9. in line 4.
id type category media author title free_link shared_by tag resource_note
615e02d8-fa04-47d8-9f1b-5d59b887c866 book social sciences audio Dan Heath, Chip Heath Switch: How to Change Things When Change Is Hard https://goo.gl/vog3H3 bit.ly/mauro_lepore bright spots, habits, change, direct the rider, shape the path, motivate the elephant, pshycology, human behaviour, growth mindset, fixed mindset
c73b6c20-5381-4804-814f-f95cc4854dd8 book social sciences audio Gary Keller, Jay Papasan The ONE Thing: The Surprisingly Simple Truth Behind Extraordinary Results https://goo.gl/GPaBZZ bit.ly/mauro_lepore productivity, efficientcy, human behaviour, habit, work
ab5a7c96-076d-41a8-a119-d3ca9ae11b2b book social sciences audio Chip Heath, Dan Heath Made to Stick https://goo.gl/pBGQm4 bit.ly/mauro_lepore writting, storytelling
8cd43ba3-c3f1-4872-9f2c-9f3211e6d532 book social sciences audio Russ Harris, Steven Hayes The Confidence Gap: A Guide to Overcoming Fear and Self-Doubt https://goo.gl/56C5s7 bit.ly/mauro_lepore pshy
We can't make this file beautiful and searchable because it's too large.
"record_id","month","day","year","plot_id","species_id","sex","hindfoot_length","weight","genus","species","taxa","plot_type"
1,7,16,1977,2,"NL","M","32","","Neotoma","albigula","Rodent","Control"
72,8,19,1977,2,"NL","M","31","","Neotoma","albigula","Rodent","Control"
224,9,13,1977,2,"NL","","","","Neotoma","albigula","Rodent","Control"
266,10,16,1977,2,"NL","","","","Neotoma","albigula","Rodent","Control"
349,11,12,1977,2,"NL","","","","Neotoma","albigula","Rodent","Control"
363,11,12,1977,2,"NL","","","","Neotoma","albigula","Rodent","Control"
435,12,10,1977,2,"NL","","","","Neotoma","albigula","Rodent","Control"
506,1,8,1978,2,"NL","","","","Neotoma","albigula","Rodent","Control"
588,2,18,1978,2,"NL","M","","218","Neotoma","albigula","Rodent","Control"
@maurolepore
maurolepore / unconf18.md
Last active May 13, 2018 21:50
Ideas for rOpenSci unconference 2018

Ideas for rOpenSci unconference 2018

  • Build the metapackage rOpenSci to find packages and functions in any other rOpenSci package (similar to fgeo).

  • Build a tool to acknowledge contributions.

  • Build a tool (rstudio shiny app + addin?, or simply function) that does the job of handy::edit_rstudio_recent_projects().

    • check boxes to pick the 10 projects to be listed
    • record more than 10 projects
    • sort projects
  • sort by activity

@maurolepore
maurolepore / aspect.md
Last active April 30, 2018 21:10
Aspect plots for Stuart Davies
library(tidyverse)

aspect <- tribble(
       ~aspect, ~mean,  ~min, ~max,
      "Valley",  3.21,  1.93, 4.41,
       "Slope", -0.24, -1.78, 1.22,
  "High Gully",  0.32, -3.47, 2.95,
       "Ridge", -2.47, -8.85, 2.61
)