I am trying to create a PDF file (from Sweave .Rnw file in Rstudio).
When I run the code on its own, it seems to work:
library(ggplot2)
library(GGally)
ggparcoord(data.frame(mtcars), columns=1:6, alphaLines=0, boxplot=TRUE, scale="globalminmax") + coord_flip()
However, when I try to input this code into the .Rnw file, I get the code outputted, but the image is outputted. I am receiving no errors or warnings, as far as I know.
\documentclass{article}
\usepackage{float, hyperref}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\SweaveOpts{concordance=TRUE}
\author{myName}
\title{myTitle}
\maketitle
<<options, echo=FALSE>>=
library(knitr)
opts_chunk$set(cache=TRUE)
@
\section*{Make ggparcoord plot in Sweave}
<<>>=
library(ggplot2)
library(GGally)
ggparcoord(data.frame(mtcars), columns=1:6, alphaLines=0, boxplot=TRUE, scale="globalminmax") + coord_flip()
@
\end{document}