0

I'm running RStudio Version 1.2.1335 and am having difficulty knitting an R markdown file to HTML. I don't know what this error message means or what a solution might be. I/ve gone through and run each chunk to ensure there are no coding errors. I was unable to find a similar problem/question online. Thanks for any help!

Here is an example start to my markdown file:

---
title: "Linking environmental contaminants with hepatic and biliary disease in White perch from Choptank and Severn Rivers"
author:
- Mark Matsche
- Cooperative Oxford Laboratory
- mark.matsche@maryland.gov
date: '`r Sys.Date()`'
output:
  html_document:
    df_print: paged
    fig_caption: yes
    theme: united
    toc: yes
    toc_float: yes
indent: yes
header-includes: \setlength\parindent{24pt}
---
<style type="text/css">

body, td {
   font-size: 12pt;
}
code.r{
  font-size: 16pt;
}
pre {
  font-size: 16pt
}

caption {
      color: black;
      font-weight: bold;
      font-size: 1.0em;
    } 
</style>




```{r setup, include = FALSE}
options(knitr.table.format = "html")
knitr::opts_chunk$set(echo = TRUE)
```

```{r echo=FALSE, include= FALSE, message= FALSE, warning= FALSE}

# This function will load packages.

library(tidyverse)
library(readxl)
library(kableExtra)
library(knitr)
library(ggplot2)
library(png)
library(tinytex)
library(scales)
library(grid)
library(svglite) # needed to save vector graphics
library(broom)
library(lemon)
#library(plyr)
#library(rms)
#library(GGally)
#library(car) #need for calculating vifs
#library(leaps) #stepwise regression
#library(DAAG) #need for doing cross validation
#library(rms) #check structural form
#library(ROCR) #compute sensitivity and specificity
```
```{r readxl, echo=FALSE}
Alldata<-read_excel("Data12Aug.xlsx")
```
Fishguy
  • 35
  • 4
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and that can be used to test and verify possible solutions. Error messages on their own aren't always specific enough to say what's going on. – MrFlick Jan 21 '20 at 16:40
  • Ok, sorry. Just edited to include the start of my markdown file. – Fishguy Jan 21 '20 at 16:52
  • Is the code you shared sufficient to trigger the error message? I don't seem to get that error. – MrFlick Jan 21 '20 at 17:00
  • 1
    Yes, I get an error with that code. I also created a new markdown file and ran it unchanged and I get the same error message. Maybe something with how my RStudio is set up? I can run chunks of code in a regular R file without errors. I can also run chunks individually within Rmarkdown. It is only when I try to knit that I receive this error. – Fishguy Jan 21 '20 at 17:21

0 Answers0