Hi,
I'm having trouble when knitting to PDF. I have run
this commando from the evir package:
qplot(data, xi=0.4)
I can run the code in an Makrdown chunk and get a nice plot. But once I want to compile, I get the following error:
Error in as.enviroment(where): invalid 'pos'-argument call: ...withcallinghandlers --> withVisible -->eval --> eval -->qplot -->exists Run stopped
This is my YAML:
classoption: twoside
documentclass: article
fontsize: 12pt
geometry: margin = 1in
header-includes:
- \usepackage{float}
- \floatplacement{figure}{H}
- \usepackage{fancyhdr}
- \usepackage{xcolor}
- \pagestyle{fancy}
- \newcommand{\RR}{\mathbb{R}}
- \newcommand{\CC}{\mathbb{C}}
- \newcommand{\N}{\mathbb{N}}
- \lhead{\nouppercase{\leftmark}}
latex_engine: xelatex
linestretch: 1.2
numbersections: yes
output: pdf_document
toc: yes
fig_caption: yes
And my packages:
library(evir)
library(tinytex)
library(ggplot2)
library(MASS)
library(dplyr)
library(mixtools)
library(actuar)
library(xtable)
library(knitr)
library(evmix)
library(eva)
If I delete the code with the qplot, I can easily knit my PDF document.
Can anyone help?