I hereby claim:
- I am lgatto on github.
- I am lgatto (https://keybase.io/lgatto) on keybase.
- I have a public key whose fingerprint is 3228 0F50 8589 B085 9E3D A828 0C03 2B80 46E2 E38A
To claim this, I am signing this object:
## l1 is a list with 20 numeric elements of length 1e4 each | |
set.seed(123) | |
l2 <- l1 <- replicate(20,rnorm(1e4),simplify=FALSE) | |
length(l1) | |
sapply(l1,length) | |
## l2 is the same list with names | |
names(l2) <- paste0("X", 1:length(l2)) |
(defun insert-md-code-chunk () | |
"Insert Rmd code chunk" | |
(interactive) | |
(insert "```\n\n```") | |
(backward-char 4)) | |
(defun insert-rmd-code-chunk () | |
"Insert Rmd code chunk" | |
(interactive) | |
(insert "```{r}\n\n```") |
> isIn <- function(x, y) { | |
+ sel <- match(x, y) | |
+ y[sel] | |
+ } | |
> x <- sample(LETTERS, 5) | |
> isIn(x, LETTERS) | |
[1] "Q" "Z" "K" "V" "U" | |
> | |
> x | |
[1] "Q" "Z" "K" "V" "U" |
--- | |
title: " Embedded Shiny Apps" | |
runtime: shiny | |
output: | |
html_document: | |
theme: united | |
--- | |
## Setup |
d <- 1:200 | |
N <- 1000 | |
dat <- lapply(d, function(i) replicate(i, runif(N))) | |
nout <- function(m) mean(apply(m, 1, function(i) any(i < 0.01 | i > 0.99))) | |
res <- sapply(dat, nout) | |
plot(res, type = "l", | |
xlab = "Number of dimensions", |
colour_picker <- function() { | |
n <- length(colours()) | |
i <- ceiling(sqrt(n)) | |
m <- matrix(c(1:n, rep(NA, i^2 - n)), | |
ncol = i, nrow = i) | |
## plotting | |
image(m, col = colours(), | |
xaxt = "n", yaxt = "n") | |
k <- seq(0, 1, length.out = i) | |
kk <- expand.grid(k, k) |
def fib(n): | |
fib = [0, 1] | |
while len(fib) < n+1: | |
fib.append(fib[-2] + fib[-1]) | |
return fib[1:] |
I hereby claim:
To claim this, I am signing this object:
(setq package-user-dir (expand-file-name "~/fmp")) | |
(require 'package) | |
(package-initialize) | |
(require 'ess-site) | |
(require 'poly-R) | |
(require 'poly-markdown) |
## load packages and data | |
library("pRoloc") | |
library("pRolocdata") | |
data(hyperLOPIT2015) | |
## produce PCA plot | |
plot2D(hyperLOPIT2015) | |
addLegend(hyperLOPIT2015, where = "bottomleft", cex = .7) | |
## Find Tfe3's identifier and define it as a |