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
functions { | |
vector convolve(vector a, vector b) { | |
int na = num_elements(a); // Vector lengths | |
int nb = num_elements(b); | |
int n_zero_a = nb - 1; // Zero padding lengths | |
int n_zero_b = na - 1; | |
vector[nb] b_rev = reverse(b); // The reversed b vector | |
vector[na + n_zero_a] a_pad; // Instantiate zero padded vectors |
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
# Set default user agent header | |
options(HTTPUserAgent = sprintf( | |
"R/%s R (%s)", | |
getRversion(), | |
paste( | |
getRversion(), | |
R.version["platform"], | |
R.version["arch"], | |
R.version["os"] | |
) |
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
# This works for many common packages, not just arrow! | |
# fast install from https://arrow.apache.org/docs/r/articles/install.html#method-1a---binary-r-package-containing-libarrow-binary-via-rspmconda | |
options( | |
HTTPUserAgent = | |
sprintf( | |
"R/%s R (%s)", | |
getRversion(), | |
paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"]) | |
) | |
) |