I'm a regular list
- first
- second
- third
I'm a modified list
{:start="10"}
- tenth
| library(jsonlite) | |
| library(tidyverse) | |
| library(maps) | |
| library(gganimate) | |
| library(countrycode) | |
| workshop_data <- jsonlite::fromJSON( | |
| "https://feeds.carpentries.org/all_workshops.json" | |
| ) |
I'm a regular list
I'm a modified list
{:start="10"}
| library(tidyverse) | |
| library(maps) | |
| library(gganimate) | |
| library(countrycode) | |
| wkshp_data <- read_csv("https://data.softwarecarpentry.org/api/queries/118/results.csv?api_key=GR8itg5dtYtq1A1Myv8bR5rrDNMZRlGc4cMVSnfB") %>% | |
| filter(start_date < "2019-07-01") | |
| wkshp_data <- wkshp_data %>% |
| # Resolving this: http://stackoverflow.com/questions/32035865/r-remove-rows-from-a-data-frame-that-contain-a-duplicate-of-either-combination-o | |
| # using dplyr | |
| Var1 <- c(1,2,3,4,5,5) | |
| Var2 <- c(4,3,2,1,5,5) | |
| f <- c("blue","green","yellow","red","orange2","grey") | |
| g <- c("blue","green","yellow","red","orange1","grey") | |
| testdata <- data.frame(Var1,Var2,f,g) | |
| library(dplyr) |
| #NEXUS | |
| Begin taxa; | |
| Dimensions ntax=39; | |
| Taxlabels | |
| N0292 | |
| N0293 | |
| NA | |
| S0187 | |
| S0432 |
| tab <- data.frame(a = letters[1:4], b = 1:4, c = letters[5:8], d = 5:8, | |
| stringsAsFactors = FALSE) | |
| last_row <- apply(tab, 2, function(x) { | |
| res <- as.numeric(x) | |
| if (any(is.na(res))) | |
| "" | |
| else sum(res) | |
| }) |
I hereby claim:
To claim this, I am signing this object:
| ==15073== Memcheck, a memory error detector | |
| ==15073== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. | |
| ==15073== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info | |
| ==15073== Command: /usr/local/lib64/R/bin/exec/R -f test-all.R --restore --save --no-readline --vanilla | |
| ==15073== | |
| R Under development (unstable) (2014-11-29 r67076) -- "Unsuffered Consequences" | |
| Copyright (C) 2014 The R Foundation for Statistical Computing | |
| Platform: x86_64-unknown-linux-gnu (64-bit) |
| library(whisker) | |
| library(knitr) | |
| responses <- read.csv(file="applicants.csv", stringsAsFactors=FALSE) | |
| names(responses)[ncol(responses)] <- "attendance" | |
| responses_lst <- apply(responses, 1, function(x) as.list(x)) | |
| template <- " | |
| -------------------- |
| ##' Converts a tree created by RAxML so that the bootstrap values are | |
| ##' assigned to nodes instead of edges. | |
| ##' | |
| ##' By default, (and rightly so), RAxML returns the bootstrap values | |
| ##' on an unrooted tree assigned to the edges. Most often, users want | |
| ##' the bootstrap values assigned to nodes instead. This function uses | |
| ##' a little regular expression to assign the boostrap values to the | |
| ##' nodes. It might not always work, use with caution. | |
| ##' @title Convert RAxML edge labels bootstrap values to node labels | |
| ##' @param f the tree file generated by RAxML |