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 | |
| # 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 |
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
| # MIT License | |
| # | |
| # Copyright (c) 2025 Måns Magnusson | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
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
| #' 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 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
| stringi::stri_enc_detect(content(r, "raw")) |
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
| #' @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 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
| #' @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 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
| ##################### | |
| # 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 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
| ##################### | |
| # 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) | |
| { |