Skip to content

Commit

Permalink
fix isssues with non-ascii chars in data
Browse files Browse the repository at this point in the history
  • Loading branch information
HomoCodens committed Feb 20, 2023
1 parent bc1b4c1 commit 5296a81
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions R/series.R
Expand Up @@ -16,7 +16,7 @@
#' check \tab check.acf \tab acf \tab autocorrelation function of residuals with standard errors and Ljung-Box Q-statistics computed through each lag \cr
#' check \tab check.acfsquared \tab ac2 \tab autocorrelation function of squared residuals with standard errors and Ljung-Box Q-statistics computed through each lag \cr
#' check \tab check.pacf \tab pcf \tab partial autocorrelation function of residuals with standard errors \cr
#' composite \tab composite.adjcompositesrs \tab b1 \tab aggregated time series data, prior adjusted, with associated dates \cr
#' composite \tab composite.adjcompositesrs \tab b1 \tab aggregated time series data, prior adjusted, with associated dates \cr
#' composite \tab composite.calendaradjcomposite \tab cac \tab aggregated time series data, adjusted for regARIMA calendar effects. \cr
#' composite \tab composite.compositesrs \tab cms \tab aggregated time series data, with associated dates \cr
#' composite \tab composite.indadjsatot \tab iaa \tab final indirect seasonally adjusted series, with yearly totals adjusted to match the original series \cr
Expand Down Expand Up @@ -48,7 +48,7 @@
#' estimate \tab estimate.armacmatrix \tab acm \tab correlation matrix of ARMA parameter estimates if used with the print argument; covariance matrix of same if used with the save argument \cr
#' estimate \tab estimate.iterations \tab itr \tab detailed output for estimation iterations, including log-likelihood values and parameters, and counts of function evaluations and iterations \cr
#' estimate \tab estimate.regcmatrix \tab rcm \tab correlation matrix of regression parameter estimates if used with the print argument; covariance matrix of same if used with the save argument \cr
#' estimate \tab estimate.regressioneffects \tab ref \tab Xβ,b matrix of regression variables multiplied by the vector of estimated regression coefficients \cr
#' estimate \tab estimate.regressioneffects \tab ref \tab Xβ matrix of regression variables multiplied by the vector of estimated regression coefficients \cr
#' estimate \tab estimate.residuals \tab rsd \tab model residuals with associated dates or observation numbers \cr
#' estimate \tab estimate.roots \tab rts \tab roots of the autoregressive and moving average operators in the estimated model \cr
#' force \tab force.forcefactor \tab ffc \tab factors applied to get seasonally adjusted series with constrained yearly totals (if type = regress or type = denton) \cr
Expand Down
Binary file modified data/specs.RData
Binary file not shown.
4 changes: 2 additions & 2 deletions man/series.Rd

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

14 changes: 13 additions & 1 deletion noinst/specs/update_specs.R
@@ -1,3 +1,4 @@
library(tidyverse)

# Update SPECS.csv --------------------------------------------------------

Expand All @@ -8,7 +9,18 @@ source("noinst/specs/specs_from_pdf.R")


# load SPECS data from .csv and store as data/SPECS.RData
SPECS <- read.csv("noinst/specs/SPECS.csv", stringsAsFactors = FALSE)
SPECS <- read_csv("noinst/specs/SPECS.csv") |>
# Fix non-ascii characters. R CMD CHECK only allows ascii in data
mutate(
description = stringi::stri_trans_general(description, "latin-ascii")
) |>
mutate(
# Fix for estimate.regressioneffects. The beta should have a circumflex
# but pdftools::pdf_text seens unable to reflect that.
description = gsub("Xβ,b", "", description)
) |>
as.data.frame()


save(SPECS, file = "data/specs.RData", version = 2) # version 3 requires >= R3.5

Expand Down

0 comments on commit 5296a81

Please sign in to comment.