diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a617ad78..d52dfe0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,11 +11,13 @@ jobs: - uses: actions/checkout@v2 - name: Add kableExtra run: Rscript -e 'install.packages("kableExtra")' + - name: CRAN crunch + run: Rscript -e 'install.packages("crunch")' - name: Build run: R CMD build --no-build-vignettes --no-manual . - name: Check run: | - R CMD check --no-vignettes --no-manual crunchtabs_*.tar.gz + R CMD check --no-vignettes --ignore-vignettes --no-manual crunchtabs_*.tar.gz - name: Coverage run: | Rscript -e 'covr::codecov(token = "${{ secrets.CODECOV_TOKEN }}")' diff --git a/DESCRIPTION b/DESCRIPTION index c5b31946..7d363040 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -16,7 +16,7 @@ URL: https://github.com/Crunch-io/crunchtabs BugReports: https://github.com/Crunch-io/crunchtabs/issues License: LGPL (>= 3) Depends: - R (>= 3.3.0), + R (>= 3.5.0), crunch, kableExtra Imports: diff --git a/R/codebookLatex.R b/R/codebookLatex.R index 295a7634..674768fb 100644 --- a/R/codebookLatex.R +++ b/R/codebookLatex.R @@ -136,7 +136,7 @@ codeBookItemBody.CategoricalVariable <- function(x, ...) { kableExtra::kable( k, "latex", booktabs = TRUE, longtable = TRUE, align = alignment) %>% kable_styling_defaults(...) %>% - column_spec(c(1,3), width = "1in") + kableExtra::column_spec(c(1,3), width = "1in") } @@ -156,9 +156,7 @@ codeBookItemBody.CategoricalArrayVariable <- function(x, ...) { col_two <- 1.5 - k <- k %>% dplyr::mutate( - Variable = cell_spec(Variable, "latex", monospace = TRUE) - ) + k$Variable <- kableExtra::cell_spec(k$Variable, "latex", monospace = TRUE) ln = ncol(k) - 2 @@ -170,10 +168,10 @@ codeBookItemBody.CategoricalArrayVariable <- function(x, ...) { align = alignment, escape = F) %>% # kable_styling_defaults(...) %>% - column_spec(1, width = paste0(col_one, "in")) %>% - column_spec(2, width = paste0(col_two, "in")) %>% + kableExtra::column_spec(1, width = paste0(col_one, "in")) %>% + kableExtra::column_spec(2, width = paste0(col_two, "in")) %>% # column_spec(c(3:ncol(k)), width = paste0(header_width[-1], "in")) %>% - add_header_above(c("", "", "Codes" = ln)) + kableExtra::add_header_above(c("", "", "Codes" = ln)) } #' @describeIn codeBookItemBody Creates item body for MultipleResponseVariable @@ -187,7 +185,7 @@ codeBookItemBody.DatetimeVariable <- function(x, ...) { alignment <- c("c", "l") kableExtra::kable(k, "latex", booktabs = TRUE, longtable = TRUE, align = alignment) %>% kable_styling_defaults(...) %>% - column_spec(1, width = "1in") + kableExtra::column_spec(1, width = "1in") } #' @describeIn codeBookItemBody Creates item body for NumericVariable @@ -197,7 +195,7 @@ codeBookItemBody.NumericVariable <- function(x, ...) { alignment <- c("c", "l") kableExtra::kable(k, "latex", booktabs = TRUE, longtable = TRUE, align = alignment) %>% kable_styling_defaults(...) %>% - column_spec(1, width = "1in") + kableExtra::column_spec(1, width = "1in") } #' @describeIn codeBookItemBody Creates item body for TextVariable @@ -207,7 +205,7 @@ codeBookItemBody.TextVariable <- function(x, ...) { alignment <- c("c","l") kableExtra::kable(k, "latex", booktabs = TRUE, longtable = TRUE, align = alignment) %>% kable_styling_defaults(...) %>% - column_spec(1, width = "1in") + kableExtra::column_spec(1, width = "1in") } # utils ---- diff --git a/R/utils.R b/R/utils.R index 103083d3..895ee846 100644 --- a/R/utils.R +++ b/R/utils.R @@ -157,11 +157,39 @@ collapse_items <- function(x, and = FALSE, or = FALSE, quotes = FALSE){ #' crunch test wrapper #' #' Use this to wrap tests that require access to -#' the crunch api +#' the crunch api. +#' #' #' @param fixture_path A full path to fixtures #' @param expr An expression to be run within the api fixture #' @export +# with_api_fixture <- function(fixture_path, expr) { +# with( +# crunch::temp.options( +# crunch.api = "https://app.crunch.io/api/", +# httptest.mock.paths = fixture_path, +# crunch.show.progress = FALSE +# ), +# httptest::with_mock_api( +# # Also need to redact UUIDs as is done in POSTs +# with_mock( +# `crunch::crPOST` = function(...) { +# args <- list(...) +# # Necessary for post +# args$body <- gsub("([0-9a-f]{6})[0-9a-f]{26}", "\\1", args$body) +# args[[1]] <- gsub("([0-9a-f]{6})[0-9a-f]{26}", "\\1", args[[1]]) +# #args$body <- gsub("[0-9A-Za-z]{22}([0-9]{6})", "\\1", args$body) +# #args[[1]] <- gsub("[0-9A-Za-z]{22}([0-9]{6})", "\\1", args[[1]]) +# do.call( +# function(...) crunch:::crunchAPI("POST", ...), +# args +# ) +# }, +# expr +# ) +# ) +# ) +# } with_api_fixture <- function(fixture_path, expr) { with( crunch::temp.options( @@ -170,27 +198,11 @@ with_api_fixture <- function(fixture_path, expr) { crunch.show.progress = FALSE ), httptest::with_mock_api( - # Also need to redact UUIDs as is done in POSTs - with_mock( - `crunch::crPOST` = function(...) { - args <- list(...) - # Necessary for post - args$body <- gsub("([0-9a-f]{6})[0-9a-f]{26}", "\\1", args$body) - args[[1]] <- gsub("([0-9a-f]{6})[0-9a-f]{26}", "\\1", args[[1]]) - #args$body <- gsub("[0-9A-Za-z]{22}([0-9]{6})", "\\1", args$body) - #args[[1]] <- gsub("[0-9A-Za-z]{22}([0-9]{6})", "\\1", args[[1]]) - do.call( - function(...) crunch:::crunchAPI("POST", ...), - args - ) - }, - expr - ) + expr ) ) } - #' Default Logo #' #' Use YouGov's default logo. All trademarks are property of their respective owners. diff --git a/man/with_api_fixture.Rd b/man/with_api_fixture.Rd index ed3fbd8b..9148c98e 100644 --- a/man/with_api_fixture.Rd +++ b/man/with_api_fixture.Rd @@ -13,5 +13,5 @@ with_api_fixture(fixture_path, expr) } \description{ Use this to wrap tests that require access to -the crunch api +the crunch api. } diff --git a/tests/testthat/Example Dataset with Nets.pdf b/tests/testthat/Example Dataset with Nets.pdf deleted file mode 100644 index e3fa8aec..00000000 Binary files a/tests/testthat/Example Dataset with Nets.pdf and /dev/null differ diff --git a/tests/testthat/Example Dataset with Nets.tex b/tests/testthat/Example Dataset with Nets.tex deleted file mode 100644 index 749bb3e6..00000000 --- a/tests/testthat/Example Dataset with Nets.tex +++ /dev/null @@ -1,792 +0,0 @@ -\documentclass[landscape]{article} -\usepackage[pdftex]{graphicx} -\usepackage[utf8]{inputenc} -\usepackage{fancyhdr} -\usepackage{sfmath} -\usepackage{comment} -\usepackage[T1]{fontenc} -\usepackage[pdftex=true, pdftoolbar=true, pdfmenubar=true, pdfauthor = {}, pdfcreator = {PDFLaTeX}, pdftitle = {}, colorlinks=true, urlcolor=blue, linkcolor=blue, citecolor=blue, implicit=true, hypertexnames=false]{hyperref} -\usepackage[scaled]{helvet} -\renewcommand*\familydefault{\sfdefault} -\usepackage{booktabs, dcolumn, longtable} -\usepackage[top=0.6in, bottom=0.6in, left=0.5in, right=0.5in, includeheadfoot]{geometry} -\usepackage{array} -\usepackage[english]{babel} -\newcolumntype{B}[2]{>{#1\hspace{0pt}\arraybackslash}b{#2}} -\setlength{\parindent}{0pt} -\usepackage[dvipsnames]{color} -\definecolor{gray}{gray}{0.85} -\pagestyle{fancy} -\renewcommand{\headrulewidth}{0pt} -\renewcommand{\footrulewidth}{0pt} -\fancyhead{} -\fancyhead[L]{{\fontsize{16}{24}\textbf{Example Dataset with Nets}}} -\newcolumntype{d}{D{.}{.}{3.2}} -\newcolumntype{g}{D{\%}{\%}{3.0}} -\usepackage{float} -\usepackage{marginnote} -\setlength\extrarowheight{2pt} -\newlength\mywidth -\setlength\mywidth{3.5in} -\usepackage{caption} -\captionsetup[table]{labelformat=empty} -\renewcommand*{\marginfont}{\scriptsize\itshape} -\fancyfoot{} -\fancyfoot[R]{\thepage} -\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp} -\let\PBS=\PreserveBackslash -\newcommand{\longtablesep}{\endfirsthead \multicolumn{2}{c}{\textit{}} \\ \endhead \multicolumn{2}{c}{\textit{}} \\ \endfoot \endlastfoot} -\usepackage[titles]{tocloft} -\newcommand{\cftchapfont}{12} -\newcommand{\formatvardescription}[1]{#1} -\newcommand{\formatvarname}[1]{#1} -\newcommand{\formatvaralias}[1]{#1} -\newcommand{\formatvarfiltertext}[1]{\fontsize{8}{12}\textit{#1}} -\newcommand{\formatvarsubname}[1]{#1} -\usepackage{amsmath} -\newenvironment{absolutelynopagebreak} - {\par\nobreak\vfil\penalty0\vfilneg - \vtop\bgroup} - {\par\xdef\tpd{\the\prevdepth}\egroup - \prevdepth=\tpd} - - -\newcommand{\bannera}[1]{\toprule - & \multicolumn{1}{c}{\bf } & \multicolumn{2}{c}{\bf Age} & \multicolumn{2}{c}{\bf Gender} \\ \cmidrule(lr{.75em}){3-4} \cmidrule(lr{.75em}){5-6} -{\bf #1} & \multicolumn{1}{c}{Total} & \multicolumn{1}{c}{16 to 34} & \multicolumn{1}{c}{35+} & \multicolumn{1}{c}{Male} & \multicolumn{1}{c}{Female} \\ -\midrule -\endfirsthead -\toprule -& \multicolumn{5}{c}{} \\ & \multicolumn{1}{c}{\bf } & \multicolumn{2}{c}{\bf Age} & \multicolumn{2}{c}{\bf Gender} \\ \cmidrule(lr{.75em}){3-4} \cmidrule(lr{.75em}){5-6} -{\bf #1} & \multicolumn{1}{c}{Total} & \multicolumn{1}{c}{16 to 34} & \multicolumn{1}{c}{35+} & \multicolumn{1}{c}{Male} & \multicolumn{1}{c}{Female} \\ -\midrule -\endhead -\midrule -& \multicolumn{5}{c}{} \\ -\bottomrule -\endfoot -\bottomrule -\endlastfoot -} -\newcommand{\tbltopa[1]}{ -\begin{longtable}{@{\extracolsep{\fill}}>{\hangindent=1em \PBS \raggedright \hspace{0pt}}b{#1}*{5}{r}}} - -\newcommand{\bannerb}[1]{\toprule - & \multicolumn{1}{c}{\bf } & \multicolumn{3}{c}{\bf Age} \\ \cmidrule(lr{.75em}){3-5} -{\bf #1} & \multicolumn{1}{c}{Total} & \multicolumn{1}{c}{16 to 34} & \multicolumn{1}{c}{35 to 54} & \multicolumn{1}{c}{55+} \\ -\midrule -\endfirsthead -\toprule -& \multicolumn{4}{c}{} \\ & \multicolumn{1}{c}{\bf } & \multicolumn{3}{c}{\bf Age} \\ \cmidrule(lr{.75em}){3-5} -{\bf #1} & \multicolumn{1}{c}{Total} & \multicolumn{1}{c}{16 to 34} & \multicolumn{1}{c}{35 to 54} & \multicolumn{1}{c}{55+} \\ -\midrule -\endhead -\midrule -& \multicolumn{4}{c}{} \\ -\bottomrule -\endfoot -\bottomrule -\endlastfoot -} -\newcommand{\tbltopb[1]}{ -\begin{longtable}{@{\extracolsep{\fill}}>{\hangindent=1em \PBS \raggedright \hspace{0pt}}b{#1}*{4}{r}}} - -\begin{document} -\setlength{\LTleft}{0pt} -\setlength{\LTright}{\fill} -\setlength{\LTcapwidth}{\textwidth} -\vspace{.25in} - - - - -{ -%% here's where individual input starts %% - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 1. Do you have any of these animals as pets? Please select all that apply.} -\hangindent=0em \parbox{9in}{ -\formatvardescription{1. Do you have any of these animals as pets? Please select all that apply.}\\ -\formatvarfiltertext{Uniform base is True.}} \\ -\addlinespace -\bannera{} - - -Cat & 25\% & 0\% & 53\% & 46\% & 0\% \\ -Dog & 47\% & 31\% & 65\% & 28\% & 71\% \\ -Bird & 38\% & 44\% & 33\% & 28\% & 51\% \\ -\midrule -Unweighted N & \multicolumn{1}{c}{17} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{9} & \multicolumn{1}{c}{8} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -Cat & 25\% & 0\% & 100\% & 0\% \\ -Dog & 47\% & 31\% & 35\% & 100\% \\ -Bird & 38\% & 44\% & 35\% & 30\% \\ -\midrule -Unweighted N & \multicolumn{1}{c}{17} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{8} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 2. What is your favorite pet?} -\hangindent=0em \parbox{9in}{ -\formatvardescription{2. What is your favorite pet?}} \\ -\addlinespace -\bannera{} - - -\textbf{header} & & & & & \\ -Cat & 30\% & 38\% & 25\% & 18\% & 44\% \\ -\textbf{Net: Cat/Bird} & \textbf{50\%} & \textbf{38\%} & \textbf{58\%} & \textbf{30\%} & \textbf{73\%} \\ -Dog & 50\% & 62\% & 42\% & 69\% & 27\% \\ -\textbf{Net: Cat/Dog} & \textbf{80\%} & \textbf{100\%} & \textbf{67\%} & \textbf{87\%} & \textbf{71\%} \\ -Bird & 20\% & 0\% & 33\% & 12\% & 29\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 99\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{13} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{7} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -\textbf{header} & & & & \\ -Cat & 30\% & 38\% & 0\% & 69\% \\ -\textbf{Net: Cat/Bird} & \textbf{50\%} & \textbf{38\%} & \textbf{35\%} & \textbf{100\%} \\ -Dog & 50\% & 62\% & 65\% & 0\% \\ -\textbf{Net: Cat/Dog} & \textbf{80\%} & \textbf{100\%} & \textbf{65\%} & \textbf{69\%} \\ -Bird & 20\% & 0\% & 35\% & 31\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{13} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{4} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 3A. Name the kinds of pets you have at these locations. — Home} -\hangindent=0em \parbox{9in}{ -\formatvardescription{3A. Name the kinds of pets you have at these locations. — Home}} \\ -\addlinespace -\bannera{} - - -Cat & 49\% & 22\% & 66\% & 100\% & 26\% \\ -Dog & 43\% & 56\% & 34\% & 0\% & 62\% \\ -Bird & 9\% & 22\% & 0\% & 0\% & 13\% \\ -\textbf{Net: Cat/Dog} & \textbf{92\%} & \textbf{78\%} & \textbf{100\%} & \textbf{100\%} & \textbf{88\%} \\ -\midrule -Totals & 101\% & 100\% & 100\% & 100\% & 101\% \\ -Unweighted N & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{6} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -Cat & 49\% & 22\% & 100\% & 46\% \\ -Dog & 43\% & 56\% & 0\% & 54\% \\ -Bird & 9\% & 22\% & 0\% & 0\% \\ -\textbf{Net: Cat/Dog} & \textbf{92\%} & \textbf{78\%} & \textbf{100\%} & \textbf{100\%} \\ -\midrule -Totals & 101\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{6} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 3B. Name the kinds of pets you have at these locations. — Work} -\hangindent=0em \parbox{9in}{ -\formatvardescription{3B. Name the kinds of pets you have at these locations. — Work}} \\ -\addlinespace -\bannera{} - - -Cat & 42\% & 50\% & 36\% & 54\% & 18\% \\ -Dog & 37\% & 14\% & 54\% & 46\% & 18\% \\ -Bird & 21\% & 36\% & 11\% & 0\% & 64\% \\ -\textbf{Net: Cat/Dog} & \textbf{79\%} & \textbf{64\%} & \textbf{90\%} & \textbf{100\%} & \textbf{36\%} \\ -\midrule -Totals & 100\% & 100\% & 101\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{16} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{12} & \multicolumn{1}{c}{9} & \multicolumn{1}{c}{7} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -Cat & 42\% & 50\% & 21\% & 67\% \\ -Dog & 37\% & 14\% & 79\% & 0\% \\ -Bird & 21\% & 36\% & 0\% & 33\% \\ -\textbf{Net: Cat/Dog} & \textbf{79\%} & \textbf{64\%} & \textbf{100\%} & \textbf{67\%} \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{16} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{8} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 4. } -\hangindent=0em \parbox{9in}{ -\formatvardescription{4. }} \\ -\addlinespace -\bannera{} - - -0-1 & 6\% & 0\% & 12\% & 0\% & 14\% \\ -1-2 & 16\% & 0\% & 29\% & 29\% & 0\% \\ -2-3 & 31\% & 50\% & 15\% & 29\% & 33\% \\ -3-4 & 31\% & 14\% & 44\% & 41\% & 19\% \\ -4-5 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -5-6 & 16\% & 36\% & 0\% & 0\% & 35\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 99\% & 101\% \\ -Unweighted N & \multicolumn{1}{c}{16} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{8} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -0-1 & 6\% & 0\% & 0\% & 43\% \\ -1-2 & 16\% & 0\% & 39\% & 0\% \\ -2-3 & 31\% & 50\% & 0\% & 57\% \\ -3-4 & 31\% & 14\% & 61\% & 0\% \\ -4-5 & 0\% & 0\% & 0\% & 0\% \\ -5-6 & 16\% & 36\% & 0\% & 0\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{16} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{7} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 5. How many dogs do you have?} -\hangindent=0em \parbox{9in}{ -\formatvardescription{5. How many dogs do you have?}} \\ -\addlinespace -\bannera{} - - -0-1 & 12\% & 0\% & 21\% & 23\% & 0\% \\ -1-2 & 15\% & 12\% & 17\% & 9\% & 22\% \\ -2-3 & 17\% & 25\% & 11\% & 9\% & 25\% \\ -3-4 & 24\% & 31\% & 19\% & 0\% & 53\% \\ -4-5 & 32\% & 31\% & 32\% & 58\% & 0\% \\ -\midrule -Totals & 100\% & 99\% & 100\% & 99\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -0-1 & 12\% & 0\% & 33\% & 0\% \\ -1-2 & 15\% & 12\% & 0\% & 46\% \\ -2-3 & 17\% & 25\% & 0\% & 31\% \\ -3-4 & 24\% & 31\% & 17\% & 23\% \\ -4-5 & 32\% & 31\% & 50\% & 0\% \\ -\midrule -Totals & 100\% & 99\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 6. How many dogs do you have?} -\hangindent=0em \parbox{9in}{ -\formatvardescription{6. How many dogs do you have?}} \\ -\addlinespace -\bannera{} - - -0-0.5 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -0.5-1 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -1-1.5 & 12\% & 22\% & 0\% & 0\% & 15\% \\ -1.5-2 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -2-2.5 & 76\% & 56\% & 100\% & 100\% & 71\% \\ -2.5-3 & 12\% & 22\% & 0\% & 0\% & 15\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% & 101\% \\ -Unweighted N & \multicolumn{1}{c}{12} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{7} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -0-0.5 & 0\% & 0\% & 0\% & 0\% \\ -0.5-1 & 0\% & 0\% & 0\% & 0\% \\ -1-1.5 & 12\% & 22\% & 0\% & 0\% \\ -1.5-2 & 0\% & 0\% & 0\% & 0\% \\ -2-2.5 & 76\% & 56\% & 100\% & 100\% \\ -2.5-3 & 12\% & 22\% & 0\% & 0\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{12} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{6} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 7. } -\hangindent=0em \parbox{9in}{ -\formatvardescription{7. }} \\ -\addlinespace -\bannera{} - - -Argentina & 0\% & 0\% & 0\% & 0\% & 0\% \\ -Australia & 15\% & 12\% & 17\% & 9\% & 22\% \\ -Austria & 12\% & 12\% & 11\% & 9\% & 15\% \\ -Belgium & 29\% & 12\% & 40\% & 35\% & 22\% \\ -Brazil & 44\% & 62\% & 32\% & 46\% & 42\% \\ -\midrule -Totals & 100\% & 98\% & 100\% & 99\% & 101\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -Argentina & 0\% & 0\% & 0\% & 0\% \\ -Australia & 15\% & 12\% & 0\% & 46\% \\ -Austria & 12\% & 12\% & 17\% & 0\% \\ -Belgium & 29\% & 12\% & 50\% & 23\% \\ -Brazil & 44\% & 62\% & 33\% & 31\% \\ -\midrule -Totals & 100\% & 98\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 8. } -\hangindent=0em \parbox{9in}{ -\formatvardescription{8. }} \\ -\addlinespace -\bannera{} - - -20-30 & 27\% & 69\% & 0\% & 32\% & 22\% \\ -30-40 & 19\% & 31\% & 11\% & 0\% & 42\% \\ -40-50 & 12\% & 0\% & 21\% & 23\% & 0\% \\ -50-60 & 19\% & 0\% & 32\% & 35\% & 0\% \\ -60-70 & 5\% & 0\% & 8\% & 9\% & 0\% \\ -70-80 & 12\% & 0\% & 19\% & 0\% & 25\% \\ -80-90 & 5\% & 0\% & 8\% & 0\% & 11\% \\ -\midrule -Totals & 99\% & 100\% & 99\% & 99\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -20-30 & 27\% & 69\% & 0\% & 0\% \\ -30-40 & 19\% & 31\% & 17\% & 0\% \\ -40-50 & 12\% & 0\% & 33\% & 0\% \\ -50-60 & 19\% & 0\% & 50\% & 0\% \\ -60-70 & 5\% & 0\% & 0\% & 23\% \\ -70-80 & 12\% & 0\% & 0\% & 54\% \\ -80-90 & 5\% & 0\% & 0\% & 23\% \\ -\midrule -Totals & 99\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 9. } -\hangindent=0em \parbox{9in}{ -\formatvardescription{9. }} \\ -\addlinespace -\bannera{} - - -16 to 34 & 40\% & 100\% & 0\% & 32\% & 49\% \\ -35+ & 60\% & 0\% & 100\% & 68\% & 51\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -16 to 34 & 40\% & 100\% & 0\% & 0\% \\ -35+ & 60\% & 0\% & 100\% & 100\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 10. } -\hangindent=0em \parbox{9in}{ -\formatvardescription{10. }} \\ -\addlinespace -\bannera{} - - -16 to 34 & 40\% & 100\% & 0\% & 32\% & 49\% \\ -35 to 54 & 38\% & 0\% & 64\% & 58\% & 15\% \\ -55+ & 22\% & 0\% & 36\% & 9\% & 36\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 99\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -16 to 34 & 40\% & 100\% & 0\% & 0\% \\ -35 to 54 & 38\% & 0\% & 100\% & 0\% \\ -55+ & 22\% & 0\% & 0\% & 100\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 11. } -\hangindent=0em \parbox{9in}{ -\formatvardescription{11. }} \\ -\addlinespace -\bannera{} - - -16 to 24 & 17\% & 44\% & 0\% & 23\% & 11\% \\ -25 to 34 & 22\% & 56\% & 0\% & 9\% & 38\% \\ -35 to 44 & 19\% & 0\% & 32\% & 23\% & 15\% \\ -45 to 54 & 19\% & 0\% & 32\% & 35\% & 0\% \\ -55+ & 22\% & 0\% & 36\% & 9\% & 36\% \\ -\midrule -Totals & 99\% & 100\% & 100\% & 99\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -16 to 24 & 17\% & 44\% & 0\% & 0\% \\ -25 to 34 & 22\% & 56\% & 0\% & 0\% \\ -35 to 44 & 19\% & 0\% & 50\% & 0\% \\ -45 to 54 & 19\% & 0\% & 50\% & 0\% \\ -55+ & 22\% & 0\% & 0\% & 100\% \\ -\midrule -Totals & 99\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 12. } -\hangindent=0em \parbox{9in}{ -\formatvardescription{12. }} \\ -\addlinespace -\bannera{} - - -Male & 54\% & 44\% & 61\% & 100\% & 0\% \\ -Female & 46\% & 56\% & 39\% & 0\% & 100\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -Male & 54\% & 44\% & 83\% & 23\% \\ -Female & 46\% & 56\% & 17\% & 77\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 13. What is your favorite pet?} -\hangindent=0em \parbox{9in}{ -\formatvardescription{13. What is your favorite pet?}} \\ -\addlinespace -\bannera{} - - -0-0.2 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -0.2-0.4 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -0.4-0.6 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -0.6-0.8 & 30\% & 38\% & 25\% & 18\% & 44\% \\ -0.8-1 & 20\% & 0\% & 33\% & 12\% & 29\% \\ -1-1.2 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -1.2-1.4 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -1.4-1.6 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -1.6-1.8 & 50\% & 62\% & 42\% & 69\% & 27\% \\ -1.8-2 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 99\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -0-0.2 & 0\% & 0\% & 0\% & 0\% \\ -0.2-0.4 & 0\% & 0\% & 0\% & 0\% \\ -0.4-0.6 & 0\% & 0\% & 0\% & 0\% \\ -0.6-0.8 & 30\% & 38\% & 0\% & 69\% \\ -0.8-1 & 20\% & 0\% & 35\% & 31\% \\ -1-1.2 & 0\% & 0\% & 0\% & 0\% \\ -1.2-1.4 & 0\% & 0\% & 0\% & 0\% \\ -1.4-1.6 & 0\% & 0\% & 0\% & 0\% \\ -1.6-1.8 & 50\% & 62\% & 65\% & 0\% \\ -1.8-2 & 0\% & 0\% & 0\% & 0\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 14. Numeric data with values less then 0.} -\hangindent=0em \parbox{9in}{ -\formatvardescription{14. Numeric data with values less then 0.}\\ -\formatvarfiltertext{Not useful.}} \\ -\addlinespace -\bannera{} - - --1--0.5 & 0\% & 0\% & 0\% & 0\% & 0\% \\ --0.5-0 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -0-0.5 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -0.5-1 & 50\% & 38\% & 58\% & 31\% & 73\% \\ -1-1.5 & 0\% & 0\% & 0\% & 0\% & 0\% \\ -1.5-2 & 50\% & 62\% & 42\% & 69\% & 27\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - --1--0.5 & 0\% & 0\% & 0\% & 0\% \\ --0.5-0 & 0\% & 0\% & 0\% & 0\% \\ -0-0.5 & 0\% & 0\% & 0\% & 0\% \\ -0.5-1 & 50\% & 38\% & 35\% & 100\% \\ -1-1.5 & 0\% & 0\% & 0\% & 0\% \\ -1.5-2 & 50\% & 62\% & 65\% & 0\% \\ -\midrule -Totals & 100\% & 100\% & 100\% & 100\% \\ -Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ - -\end{longtable} -\end{center} -\clearpage - - -\begin{center} - -\tbltopa[1.5in] -\addcontentsline{lot}{table}{ 15. Do you have any of these animals as pets? Please select all that apply.} -\hangindent=0em \parbox{9in}{ -\formatvardescription{15. Do you have any of these animals as pets? Please select all that apply.}\\ -\formatvarfiltertext{Uniform base is False.}} \\ -\addlinespace -\bannera{} - - -Cat & 61\% & 0\% & 100\% & 61\% & 0\% \\ -Dog & 78\% & 56\% & 100\% & 100\% & 71\% \\ -Bird & 66\% & 64\% & 70\% & 70\% & 64\% \\ -\midrule -Unweighted N: Min & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{2} \\ -Unweighted N: Max & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{7} \\ - -\end{longtable} - - - -\vspace{-.25in} -\tbltopb[1.5in] -\addlinespace -\bannerb{} - - -Cat & 61\% & 0\% & 100\% & 0\% \\ -Dog & 78\% & 56\% & 100\% & 100\% \\ -Bird & 66\% & 64\% & 100\% & 50\% \\ -\midrule -Unweighted N: Min & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{1} & \multicolumn{1}{c}{4} \\ -Unweighted N: Max & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{7} \\ - -\end{longtable} -\end{center} -\clearpage - - -} -\end{document} - diff --git a/vignettes/FAQ.Rmd b/vignettes/FAQ.Rmd index f5a7afac..45f42e1a 100644 --- a/vignettes/FAQ.Rmd +++ b/vignettes/FAQ.Rmd @@ -7,7 +7,7 @@ output: toc: true vignette: > %\VignetteIndexEntry{Vignette Title} - %\VignetteEngine{knitr::rmarkdown} + %\VignetteEngine{knitr::knitr} %\VignetteEncoding{UTF-8} --- diff --git a/vignettes/Overview.Rmd b/vignettes/Overview.Rmd index c9bb3fa6..a533d855 100644 --- a/vignettes/Overview.Rmd +++ b/vignettes/Overview.Rmd @@ -7,7 +7,7 @@ output: toc: true vignette: > %\VignetteIndexEntry{Crunchtabs Quick Start} - %\VignetteEngine{knitr::rmarkdown} + %\VignetteEngine{knitr::knitr} %\VignetteEncoding{UTF-8} --- diff --git a/vignettes/Theming.Rmd b/vignettes/Theming.Rmd index 60a48dd4..e9d70c95 100644 --- a/vignettes/Theming.Rmd +++ b/vignettes/Theming.Rmd @@ -7,7 +7,7 @@ output: toc: true vignette: > %\VignetteIndexEntry{Vignette Title} - %\VignetteEngine{knitr::rmarkdown} + %\VignetteEngine{knitr::knitr} %\VignetteEncoding{UTF-8} ---