Watts-College / paf-515-template

https://watts-college.github.io/paf-515-template/
1 stars 1 forks source link

Lab 05 - Cannot Get File to Knit #17

Open bpiontek-asu opened 5 hours ago

bpiontek-asu commented 5 hours ago

When I attempt to knit my Lab 05 .rmd file, I get the following error:

processing file: lab05_Piontek.Rmd

Error in parse(text = code, keep.source = FALSE) :

:1:46: unexpected INCOMPLETE_STRING 1: alist( warning=FALSE, message=FALSE, results='hide )
                                             ^

Calls: ... -> handle_error -> eval -> parse_only -> parse

Invalid syntax for chunk options:

warning=FALSE, message=FALSE, results='hide

Please see documentation at https://yihui.org/knitr/options/.

Execution halted

image

From this, I would assume that the error is occurring somewhere in the first 46 lines of my code, and likely specifically in the #Libraries / #LoadPackages section, but I'm not able to determine where. My code for the first 46 lines is as follows:

--- title: "Measuring the Tax Credit Interventions - East North Central Division" author: "Beth Piontek" date: "r Sys.Date()`" output: github_document: toc: true toc_depth: 3 preserve_yaml: true rmdformats::downcute: toc_depth: 3 self_contained: true thumbnails: false lightbox: true gallery: false highlight: "tango" code_folding: show always_allow_html: true knit: (function(inputFile, encoding) { rmarkdown::render(inputFile, encoding = encoding, output_format = "all") })

knitr::opts_chunk$set(echo = TRUE)

Libraries

# Load packages
library(here)         # relative filepaths for reproducibility
library(rio)          # read excel file from URL
library(tidyverse)    # data wrangling
library(stringi)      # string data wrangling
library(tidycensus)   # US census data
library(ggplot2)      # data visualization
library(kableExtra)   # table formatting
library(scales)       # palette and number formatting
library(unhcrthemes)  # data visualization themes
library(ggrepel)      # data visualization formatting to avoid overlapping
library(rcompanion)   # data visualization of variable distribution
library(ggpubr)       # data visualization of variable distribution
library(moments)      # measures of skewness and kurtosis
library(tinytable)    # format regression tables
library(modelsummary) # format regression tables

`

image

I have pulled up https://yihui.org/knitr/options/ as suggested in the error, but have not been able to determine my issue.

I've also tried removing the ", warning=FALSE, message=FALSE, results='hide'" section of my code (line 30), but that did not help.

I seem to be able to run my code just fine in the rmd file, and my renv::status() shows no issues (project in a consistent state).

Can you help me figure out what my issue is?

castower commented 5 hours ago

Hi @bpiontek-asu, It looks like 'hide' section of your code is missing a closing quote.

I know you mentioned that the error still appeared when removing it as well so is it possible you have two sections missing the closing quote?

bpiontek-asu commented 3 hours ago

Thanks so much! I thought that the error only applied to the first 46 lines, and there wasn't missing closing quote in that section, so I hadn't looked further, but found my issue way down around line 600! Thank you!