This file contains 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
# Suppose we want to sync files through host A -> host B -> local C | |
# replace <port number>, <username>, <hostnameB>, <hostnameA> | |
rsync -av -e 'ssh -o "ProxyCommand ssh -p <port number> -A <username>@<hostnameB> -W %h:%p"' <username>@<hostnameA>:path/to/folder local/path |
This file contains 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 | |
#$ -cwd | |
#$ -j y | |
#$ -o <%= log.file %> | |
#$ -V | |
#$ -N <%= job.name %> | |
#$ -pe smp <%= resources[["slots"]] %> | |
Rscript -e 'batchtools::doJobCollection("<%= uri %>")' | |
exit 0 |
This file contains 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 | |
PATH=/share/apps/R/R-3.6.2/bin/:/share/apps/gcc-8.3/bin:$PATH | |
LD_LIBRARY_PATH=/share/apps/gcc-8.3/lib64:/home/hrl23/lib:$LD_LIBRARY_PATH | |
############################### | |
# SGE settings Here | |
# Basically, if a line starts with "#$", then you can enter any | |
# qsub command line flags . See the qsub(1) man page. |
This file contains 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
# I am translating the code from https://github.com/mrcbarbier/diffuseclique/blob/master/codes/Clique%20Coexistence%20Matrix%20Generation.R to greta | |
# using the original function | |
MatrixGen=function(etai, beta.m, beta.sd) | |
{ | |
S=length(etai) | |
mat=diag(S) | |
for(sp in 1:S) | |
{ | |
Nmi=etai[-sp] |
This file contains 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
#' Obtain LOO-IC or WAIC from \code{greta} Output | |
#' | |
#' @param observed Vector of the observed response variable | |
#' @param posterior MCMC posterior from a \code{greta} model | |
#' @param mean Name of the mean/location parameter, defaults to \code{mu} | |
#' @param scale Name of the scale/variance parameter, defaults to \code{sd} | |
#' @param family Distribution of the observational model. Currently, only | |
#' \code{normal}, \code{lognormal}, and \code{student} are implemented | |
#' @param method | |
#' \code{"loo"} to calculate the Leave-One-Out Information Criteria or |