This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://gist.github.com/muschellij2/64f9104ccec09deb85d4928071b3c9e8 | |
# set -e | |
# Comment out this line for quieter output: | |
# set -x | |
export cran_set='options(repos = "http://cran.rstudio.com"); ' | |
# we may be able to change to remotes | |
export ig_package=devtools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export LD_LIBRARY_PATH=/usr/local/clang/lib:${LD_LIBRARY_PATH} | |
wget -O travis_helpers.sh http://bit.ly/travis_helpers | |
source travis_helpers.sh | |
cat travis_helpers.sh | |
rm travis_helpers.sh | |
echo "ANTSR_TRAVIS VERSION 0.6" | |
# getting original path | |
export ORIG_PATH=${PATH} | |
# cmake may not be needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(neurobase) | |
library(papayar) | |
library(papayaWidget) # from muschellij2/papayaWidget | |
fname = "training01_01_mprage.nii.gz" | |
img = readnii(fname) | |
ortho2(img) | |
papaya(img) | |
papayaWidget(img) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm(list=ls()) | |
library(ggplot2) | |
library(ggneuro) | |
library(RNifti) | |
library(kirby21.t1) | |
library(kirby21.fmri) | |
library(matrixStats) | |
library(shiny) | |
library(neurobase) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
have_package = function(x) { | |
x %in% installed.packages() | |
} | |
if (!have_package("neurobase")) { | |
install.packages("neurobase") | |
} | |
library(neurobase) | |
fname = "training01_01_mprage.nii.gz" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(data.table) | |
n = 2 * 10^9 | |
p = runif(n) | |
big_bh_adjust = function(p) { | |
n_over_k = NULL | |
if (any(is.na(p))) { | |
stop("p-values can't have NA in them for this function") | |
} | |
# Get the number of p-values (m) | |
m = length(p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(extrantsr) | |
library(neurobase) | |
library(drammsr) | |
library(lungct) | |
base = "19786L_phase1/insp_CT.nii.gz" | |
base_mask="19786L_phase1/insp_lung_mask.nii.gz" | |
follow = '19786L_phase2/insp_CT.nii.gz' | |
follow_mask="19786L_phase2/insp_lung_mask.nii.gz" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^\..* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = "Package: test | |
Type: Package | |
Title: What the Package Does (Title Case)" | |
###################################### | |
# No Newline | |
###################################### | |
file = tempfile() | |
writeLines(x, file, sep = "") | |
readLines(file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(cluster) | |
m <- 4 #total number of outcomes | |
n <- 100 #total number of subjects | |
p <- 10 #total number of covariates | |
groups.m <- 2 ##number of groups for the columns of B | |
m.ind <- rep(1:groups.m, each = m/groups.m) | |
B <- matrix(0, p, m) |