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
##################### | |
# R function for downloading plain-text data from GitHub | |
# Christopher Gandrud | |
# 7 January 2013 | |
##################### | |
# source_GitHubData is directly based on source_url from the Hadley Wickham's devtools package | |
source_GitHubData <-function(url, sep = ",", dec=".", header = TRUE) | |
{ |
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
##################### | |
# R function for downloading plain-text data from GitHub | |
# Christopher Gandrud | |
# 7 January 2013 | |
##################### | |
# source_GitHubData is directly based on source_url from the Hadley Wickham's devtools package | |
source_GitHubData <-function(url, sep = ",", header = TRUE) | |
{ |
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
#' @title | |
#' rInvGamma | |
#' | |
#' @description | |
#' Random draws from the inverse gamma distribution. | |
#' | |
#' @param n See n in rgamma() | |
#' @param shape Alpha | |
#' @param scale Beta | |
#' |
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
#' @title | |
#' Multiple plot function | |
#' | |
#' @description | |
#' ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects). | |
#' If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE), | |
#' then plot 1 will go in the upper left, 2 will go in the upper right, and | |
#' 3 will go all the way across the bottom. | |
#' | |
#' @param cols Number of columns in layout |
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
stringi::stri_enc_detect(content(r, "raw")) |
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
#' Download a (private) file from github using a personal access token | |
#' | |
#' @description | |
#' Download a file from a private repository using GitHub API v3. | |
#' | |
#' @param repo Repository as :owner/:repo | |
#' @param path Path to file | |
#' @param pat Personal access token | |
#' | |
#' @details |
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
#' Message progress bar | |
#' | |
#' @description | |
#' A simple progress bar to use in R packages where messages are prefered to console output. | |
#' | |
#' @field iter Total number of iterations | |
#' @field i Current iteration | |
#' @field width Width of the R console | |
#' @field width_bar Width of the progress bar | |
#' @field progress The number of character printed (continous) |
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 | |
# Assumptions: | |
# None | |
# | |
# Description: | |
# Moves a full folder from an old project account to a new project account at NSC (Gamma) | |
# | |
LIUNAME=x_manma | |
OLD_NSC_ACCOUNT=liu-2015-00017-47 | |
NEW_NSC_ACCOUNT=liu-2015-00020-3 |