R/RcppExports.R

Defines functions cppRelStab jitter_ppq5 jitter_rap jitter_ddp jitter_local nPVI rPVI

Documented in jitter_ddp jitter_local jitter_ppq5 jitter_rap nPVI rPVI

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Raw pairwise variability index.
#' 
#' Computes the raw Pairwire Variability Index (rPVI) on a supplied vector of durations.
#' 
#' @author Fredrik Karlsson
#' @export
#' 
#' @param x A vector of durations in arbitrary unit.
#' @param omit Boolean indicating whether NA values should be removed before calculating rPVI.
#' 
#' @return A single value representing the rPVI for the vector of durations
#' 
#' @references Nolan, F., & Asu, E. L. (2009). The Pairwise Variability Index and Coexisting Rhythms in Language. Phonetica, 66(1-2), 64–77. doi:10.1159/000208931 
#' @name rPVI
NULL

#' Normalized pairwise variability index.
#' 
#' Computes the normalized Pairwire Variability Index (nPVI) on a supplied vector of durations.
#' 
#' @author Fredrik Karlsson
#' @export
#' 
#' @param x A vector of durations in arbitrary unit.
#' @param omit Boolean indicating whether NA values should be removed before calculating nPVI.
#' 
#' @return A single value reprenting the nPVI for the vector of durations
#' 
#'@references Nolan, F., & Asu, E. L. (2009). The Pairwise Variability Index and Coexisting Rhythms in Language. Phonetica, 66(1-2), 64–77. doi:10.1159/000208931 
#'@name nPVI
NULL

#' Computes the local jitter of a vector.
#' 
#' @author Fredrik Karlsson
#' @export
#' 
#' @param x The input vector
#' @param min.period The minimum value to be included in the calculation.
#' @param max.period The maximum value to be included in the calculation.
#' @param absolute Should the (local) Jitter value be returned (absolute=FALSE), or the absolute (local) Jitter (absolute=TRUE). In the case of absolute (local) Jitter, the jitter will *not* be devided by the average period.
#' @param omit Should missing intervals be removed?
#' 
#' @return A value indicating the (local) jitter (absolute=FALSE) or the absolute (local) jitter (absolute=TRUE).
#' @name jitter_local
NULL

#' Computes the Difference of Differences of Periods (DDP) of a vector.
#' 
#' @author Fredrik Karlsson
#' @export
#' 
#' @param x The input vector
#' @param min.period The minimum value to be included in the calculation.
#' @param max.period The maximum value to be included in the calculation.
#' @param absolute Should the Jitter DDP value be returned (absolute=FALSE), or the absolute Jitter DDP (absolute=TRUE). 
#' In the case of absolute Jitter DDP, the jitter will *not* be devided by the average period.
#' @param omit Should missing intervals be removed?
#' 
#' @return The Jitter DDP (in s) (absolute=FALSE) or the absolute jitter DDP (in percent, $1..600%$) (absolute=TRUE). If the vector contains less than three values, NA is returned.
#' @name jitter_ddp
#' 
NULL

#' Computes the Relative Average Perturbation (RAP) of a vector.
#' 
#' @author Fredrik Karlsson
#' @export
#' 
#' @param x The input vector
#' @param min.period The minimum value to be included in the calculation.
#' @param max.period The maximum value to be included in the calculation.
#' @param absolute Should the Jitter RAP value be returned (absolute=FALSE), or the absolute Jitter RAP(absolute=TRUE). In the case of absolute Jitter RAP, the jitter will *not* be devided by the average period. 
#' @param omit Should missing intervals be removed?
#' 
#' @name jitter_rap
#' 
#' @return The RAP (in percent, $1..200%$) or absolute PPQ5 (\code{absAP}) values (in s) for the vector of values. If the vector contains less than three values, NA is returned.
NULL

#' Computes the five-point Period Perturbation Quotient (PPQ5) of a vector.
#' 
#' @author Fredrik Karlsson
#' @export
#'  
#' @param x The input vector
#' @param min.period The minimum value to be included in the calculation.
#' @param max.period The maximum value to be included in the calculation.
#'  @param absolute Should the Jitter RAP value be returned (absolute=FALSE), or the absolute Jitter PPQ5 (absolute=TRUE). In the case of absolute Jitter PPQ5, the jitter will *not* be devided by the average period. 
#' @param omit Should missing intervals be removed?
#' 
#' @name jitter_ppq5
#' 
#' @return Either the jitter PPQ5 (in percent, 1..400%) or the absolute PPQ5 values (in s, 1..4) for the vector of values. If the vector contains less than five values, NA is returned.
NULL

rPVI <- function(x, omit = FALSE) {
    .Call(`_articulated_rPVI`, x, omit)
}

nPVI <- function(x, omit = FALSE) {
    .Call(`_articulated_nPVI`, x, omit)
}

jitter_local <- function(x, minperiod, maxperiod, absolute = FALSE, omit = FALSE) {
    .Call(`_articulated_jitter_local`, x, minperiod, maxperiod, absolute, omit)
}

jitter_ddp <- function(x, minperiod, maxperiod, absolute = FALSE, omit = FALSE) {
    .Call(`_articulated_jitter_ddp`, x, minperiod, maxperiod, absolute, omit)
}

jitter_rap <- function(x, minperiod, maxperiod, absolute = FALSE, omit = FALSE) {
    .Call(`_articulated_jitter_rap`, x, minperiod, maxperiod, absolute, omit)
}

jitter_ppq5 <- function(x, minperiod, maxperiod, absolute = FALSE, omit = FALSE) {
    .Call(`_articulated_jitter_ppq5`, x, minperiod, maxperiod, absolute, omit)
}

cppRelStab <- function(x, start = 5L, end = 12L, omit = FALSE) {
    .Call(`_articulated_cppRelStab`, x, start, end, omit)
}
FredrikKarlssonSpeech/articulated documentation built on July 20, 2023, 8:20 a.m.