Skip to content

Commit

Permalink
Re-document package
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Nov 14, 2023
1 parent 3fe9ff3 commit 1bf10d2
Show file tree
Hide file tree
Showing 22 changed files with 184 additions and 159 deletions.
40 changes: 20 additions & 20 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated by Rcpp::compileAttributes
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @title Generate Random Wishart Distribution
Expand Down Expand Up @@ -26,7 +26,7 @@
#' stopifnot(all.equal(vR, Va, tolerance = 1/16))
#'
rwishart <- function(df, S) {
.Call('r2arma_rwishart', PACKAGE = 'r2arma', df, S)
.Call('_r2arma_rwishart', PACKAGE = 'r2arma', df, S)
}

#' @title Generate Random Inverse Wishart Distribution
Expand All @@ -40,7 +40,7 @@ rwishart <- function(df, S) {
#' #Call with the following data:
#' riwishart(3, diag(2))
riwishart <- function(df, S) {
.Call('r2arma_riwishart', PACKAGE = 'r2arma', df, S)
.Call('_r2arma_riwishart', PACKAGE = 'r2arma', df, S)
}

#' Subset Non-connected Regions
Expand All @@ -65,7 +65,7 @@ riwishart <- function(df, S) {
#' # Subset with Armadillo
#' get_elements(m, row_index - 1, col_index - 1)
get_elements <- function(x, row_ind, col_ind) {
.Call('r2arma_get_elements', PACKAGE = 'r2arma', x, row_ind, col_ind)
.Call('_r2arma_get_elements', PACKAGE = 'r2arma', x, row_ind, col_ind)
}

#' Reverse Subset Column
Expand All @@ -83,7 +83,7 @@ get_elements <- function(x, row_ind, col_ind) {
#' x = matrix(c(1,2,3,4), nrow = 2,byrow = TRUE)
#' rev_col_subset(x, 1, 0)
rev_col_subset <- function(x, start, end) {
.Call('r2arma_rev_col_subset', PACKAGE = 'r2arma', x, start, end)
.Call('_r2arma_rev_col_subset', PACKAGE = 'r2arma', x, start, end)
}

#' Reverse Subset Row
Expand All @@ -100,7 +100,7 @@ rev_col_subset <- function(x, start, end) {
#' x = matrix(c(1,2,3,4), nrow=2,byrow=TRUE)
#' rev_row_subset(x, 1, 0)
rev_row_subset <- function(x, start, end) {
.Call('r2arma_rev_row_subset', PACKAGE = 'r2arma', x, start, end)
.Call('_r2arma_rev_row_subset', PACKAGE = 'r2arma', x, start, end)
}

#' Reverse Armadillo Vector
Expand All @@ -114,7 +114,7 @@ rev_row_subset <- function(x, start, end) {
#' x = 1:5
#' reverse_vec(x)
reverse_vec <- function(x) {
.Call('r2arma_reverse_vec', PACKAGE = 'r2arma', x)
.Call('_r2arma_reverse_vec', PACKAGE = 'r2arma', x)
}

#' Transform an Armadillo field<vec> to a matrix
Expand All @@ -124,7 +124,7 @@ reverse_vec <- function(x) {
#' @return A \code{mat} containing the field elements within a column.
#' @author JJB
field_to_matrix <- function(x) {
.Call('r2arma_field_to_matrix', PACKAGE = 'r2arma', x)
.Call('_r2arma_field_to_matrix', PACKAGE = 'r2arma', x)
}

#' Accumulation of Armadillo field<vec>
Expand All @@ -134,7 +134,7 @@ field_to_matrix <- function(x) {
#' @return An \code{mat} containing the field elements within a column.
#' @author JJB
sum_field_vec <- function(x) {
.Call('r2arma_sum_field_vec', PACKAGE = 'r2arma', x)
.Call('_r2arma_sum_field_vec', PACKAGE = 'r2arma', x)
}

#' @title Generate an integer sequence of values
Expand All @@ -151,7 +151,7 @@ sum_field_vec <- function(x) {
#' seq_int(3, 5)
#' seq_int(5, 3)
seq_int <- function(a, b) {
.Call('r2arma_seq_int', PACKAGE = 'r2arma', a, b)
.Call('_r2arma_seq_int', PACKAGE = 'r2arma', a, b)
}

#' @title Generate a sequence of values ranging from a to b given a fixed amount of points.
Expand All @@ -169,7 +169,7 @@ seq_int <- function(a, b) {
#' seq_default(1, 2, 10)
#' seq_default(2, 1, 10)
seq_default <- function(from, to, length_out) {
.Call('r2arma_seq_default', PACKAGE = 'r2arma', from, to, length_out)
.Call('_r2arma_seq_default', PACKAGE = 'r2arma', from, to, length_out)
}

#' @title Generate a sequence of values ranging from -a to a given a fixed amount of points.
Expand All @@ -184,7 +184,7 @@ seq_default <- function(from, to, length_out) {
#' seq_default_a(1, 10)
#' seq_default_a(1, 10)
seq_default_a <- function(a, length_out) {
.Call('r2arma_seq_default_a', PACKAGE = 'r2arma', a, length_out)
.Call('_r2arma_seq_default_a', PACKAGE = 'r2arma', a, length_out)
}

#' @title Generate a sequence of values ranging from vector start to vector end
Expand All @@ -200,7 +200,7 @@ seq_default_a <- function(a, length_out) {
#' seq_along_cpp(1:10)
#' seq_along_cpp(5:10)
seq_along_cpp <- function(along_with) {
.Call('r2arma_seq_along_cpp', PACKAGE = 'r2arma', along_with)
.Call('_r2arma_seq_along_cpp', PACKAGE = 'r2arma', along_with)
}

#' @title Generate a sequence of values ranging from 0 to n-1
Expand All @@ -216,7 +216,7 @@ seq_along_cpp <- function(along_with) {
#' seq_len_cpp(2)
#' seq_len_cpp(4)
seq_len_cpp <- function(length_out) {
.Call('r2arma_seq_len_cpp', PACKAGE = 'r2arma', length_out)
.Call('_r2arma_seq_len_cpp', PACKAGE = 'r2arma', length_out)
}

#' @title Lagged Differences in Armadillo
Expand All @@ -230,7 +230,7 @@ seq_len_cpp <- function(length_out) {
#' x = rnorm(10000, 0, 1)
#' diff_cpp(x,1,1)
diff_cpp <- function(x, lag, differences) {
.Call('r2arma_diff_cpp', PACKAGE = 'r2arma', x, lag, differences)
.Call('_r2arma_diff_cpp', PACKAGE = 'r2arma', x, lag, differences)
}

#' @title Converting an ARMA Process to an Infinite MA Process
Expand All @@ -247,7 +247,7 @@ diff_cpp <- function(x, lag, differences) {
#' # ARMA(0,1)
#' ARMAtoMA_cpp(numeric(0), 1.0, 10)
ARMAtoMA_cpp <- function(ar, ma, lag_max) {
.Call('r2arma_ARMAtoMA_cpp', PACKAGE = 'r2arma', ar, ma, lag_max)
.Call('_r2arma_ARMAtoMA_cpp', PACKAGE = 'r2arma', ar, ma, lag_max)
}

#' @title Time Series Convolution Filters
Expand Down Expand Up @@ -275,7 +275,7 @@ ARMAtoMA_cpp <- function(ar, ma, lag_max) {
#' # Using R's function
#' filter(x, rep(1, 3), sides = 1, circular = TRUE)
cfilter <- function(x, filter, sides, circular) {
.Call('r2arma_cfilter', PACKAGE = 'r2arma', x, filter, sides, circular)
.Call('_r2arma_cfilter', PACKAGE = 'r2arma', x, filter, sides, circular)
}

#' @title Time Series Recursive Filters
Expand All @@ -296,7 +296,7 @@ cfilter <- function(x, filter, sides, circular) {
#' # Using R's function
#' filter(x, rep(1, 3), method="recursive", init=rep(1, 3))
rfilter <- function(x, filter, init) {
.Call('r2arma_rfilter', PACKAGE = 'r2arma', x, filter, init)
.Call('_r2arma_rfilter', PACKAGE = 'r2arma', x, filter, init)
}

#' @title Compute Theoretical ACF for an ARMA Process
Expand All @@ -314,7 +314,7 @@ rfilter <- function(x, filter, init) {
#' # ARMA(0,1)
#' ARMAacf_cpp(numeric(0), .35, lag_max = 10)
ARMAacf_cpp <- function(ar, ma, lag_max) {
.Call('r2arma_ARMAacf_cpp', PACKAGE = 'r2arma', ar, ma, lag_max)
.Call('_r2arma_ARMAacf_cpp', PACKAGE = 'r2arma', ar, ma, lag_max)
}

#' @title Discrete Fourier Transformation for Autocovariance Function
Expand All @@ -329,6 +329,6 @@ ARMAacf_cpp <- function(ar, ma, lag_max) {
#' x=rnorm(100)
#' dft_acf(x)
dft_acf <- function(x) {
.Call('r2arma_dft_acf', PACKAGE = 'r2arma', x)
.Call('_r2arma_dft_acf', PACKAGE = 'r2arma', x)
}

1 change: 0 additions & 1 deletion man/ARMAacf_cpp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/ARMAtoMA_cpp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/cfilter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/dft_acf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/diff_cpp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/field_to_matrix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/get_elements.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions man/r2arma-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/rev_col_subset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/rev_row_subset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/reverse_vec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/rfilter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions man/riwishart.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions man/rwishart.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions man/seq_along_cpp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions man/seq_default.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions man/seq_default_a.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions man/seq_int.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions man/seq_len_cpp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/sum_field_vec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1bf10d2

Please sign in to comment.