I am using R Markdown render to automate sales reporting and I am hit with the following error message:
Error: Invalid YAML front matter (ends with ':').
R Studio, function worked previously. I have tried most quick fixes I've seen online but nothing has worked.
Additionally, if you have any advice for importing company logos, I would love to hear it. When knitted locally, it appears, but once it is sent out, it disappears. I'm sure this is due to the local file path, so any advice for calling it in a non-local manner?
---
output: html_document
params:
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, comment = NA)
library(dplyr)
library(tidyverse)
library(knitr)
library(kableExtra)
library(yaml)
library(rmarkdown)
```
```{r echo=FALSE, message=FALSE, warning=FALSE, paged.print=FALSE, comment = NA}
today <- Sys.Date()
```
`r format(today, format="%B %d, %Y")`
To Whom It May Concern,
Below is your sales report for fictitious name.
```{r include=FALSE}
aug_rent <- read_csv("Aug R Rent.csv")
colnames(aug_rent)[colnames(aug_rent)=="Vendor ID"] <- "Landlord"
organ_aug <- arrange(aug_rent, aug_rent$'Landlord')
vendors <- unique(organ_aug$`Landlord`)
```
```{r echo=FALSE}
render_my_report <- function(vendor) {
rmarkdown::render("Remote.Rmd",
output_format = "html_document",
output_file = paste0(vendor, "_sales_report_", Sys.Date(), ".html"),
params = list(Landlord = vendor),
output_options = list(self_contained = FALSE, lib_dir = "libs"))
}
purrr::walk(vendors, render_my_report)
```
```{r echo=FALSE, message=FALSE, warning=FALSE, comment=NA}
test_data <- filter(organ_aug, organ_aug$'Landlord' == params)
last_table <- knitr::kable(test_data, captio = "August 2019 Sales Report")
kable_styling(last_table, font_size = 14)
```
If you have any questions regarding this report, please email BingBong284@ficticiousname.com or reach out to BingBong284, BingBong284@ficticiousname.com.
Thank you,
BingBong284, Finance
Function previously generated 66 unique sales reports for 66 vendor ID's, but it is now hitting me with the error listed above.