Skip to content

Instantly share code, notes, and snippets.

abikoushi

Block or report user

Report or block abikoushi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View geom_grid.R
require(ggplot2)
####utilities
"%||%" <- function(a, b) {
if (!is.null(a)) a else b
}
rbind_dfs <- function(dfs) {
out <- list()
columns <- unique(unlist(lapply(dfs, names)))
View geom_grid.R
require(ggplot2)
####utilities
"%||%" <- function(a, b) {
if (!is.null(a)) a else b
}
rbind_dfs <- function(dfs) {
out <- list()
columns <- unique(unlist(lapply(dfs, names)))
View geom_grid.R
require(ggplot2)
require(grid)
require(dplyr)
"%||%" <- function(a, b) {
if (!is.null(a)) a else b
}
geom_grid <- function(mapping = NULL, data = NULL,
position = "identity",
View binom_mult.cpp
#include <RcppArmadillo.h>
using namespace Rcpp;
using namespace arma;
// [[Rcpp::depends(RcppArmadillo)]]
rowvec rdirichlet(const vec & alpha){
int K = alpha.n_rows;
rowvec y(K);
for(int k=0;k<K ;k++){
y[k] = R::rgamma(alpha[k],1);
View multmix_Gibbs.cpp
#include <RcppArmadillo.h>
using namespace Rcpp;
using namespace arma;
// [[Rcpp::depends(RcppArmadillo)]]
rowvec rdirichlet(const vec & alpha){
int K = alpha.n_rows;
rowvec y(K);
for(int k=0;k<K ;k++){
y[k] = R::rgamma(alpha[k],1);
View Poisreg.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View SIRjl.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View SIRNHPP.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View SIR.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gadata.csv
userGender userAgeBracket (direct) anlyznews.com b.hatena.ne.jp bing facebook.com google langstat.hatenablog.com m.facebook.com matome.naver.jp search.fenrir-inc.com search.smt.docomo sp-web.search.auone.jp t.co yahoo
female 18-24 241 0 0 370 0 2546 0 0 13 0 13 0 34 579
female 25-34 370 0 0 236 0 2896 0 0 17 0 24 21 47 687
female 35-44 352 0 0 54 0 1190 0 0 17 0 31 25 36 577
female 45-54 122 0 0 24 0 347 0 0 0 0 0 0 13 190
female 55-64 52 0 0 0 0 135 0 0 0 0 0 0 0 91
female 65+ 30 0 0 0 0 62 0 0 0 0 0 0 0 62
male 18-24 859 0 15 1084 0 9714 0 0 0 0 14 0 328 1265
male 25-34 1107 11 63 583 15 11186 17 28 15 0 20 31 800 1476
male 35-44 791 0 39 226 0 5957 0 25 10 12 24 14 511 1355
You can’t perform that action at this time.