natbib error (no .bbl file created)

#1

I am writing an Rnw file in RStudio using Sweave.

I have my citations in a .bib file which is saved in the same location at the .Rnw file.

When I compile the document, I get the error message, "There were undefined citations" and when I check the folder, I see that no .bbl file was created.

My .Rnw file and .bib files are shown below. Any ideas?

(I am running RStudio version 1.2.1335 on MacOS High Sierra (v10.13.6))

Update: This runs perfectly fine and creates the proper .bbl file and compiles correctly in RStudio version 1.0.143, which I had installed on another machine. Of older, archived versions of RStudio still available for download, version 1.0.153 was closest so I installed that version and tried with no luck - I get the same error message and failure to compile as with v1.1.463.
Additionally, per a suggestions from Stack Overflow, I used the command line to run bibtex directly on this Rnw file and then recompiled in RStudio twice and the document and citations compiled perfectly. So the issue would appear to be that bibtex isn't being called directly through RStudio.

\documentclass[12pt, oneside]{article}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{graphicx}
\usepackage{float}
\usepackage[sort,comma,numbers,super]{natbib}
\usepackage{url}
\usepackage{enumitem}
\usepackage[utf8]{inputenc}
\usepackage[letterpaper, top=1in, bottom=1in, right=1in, left=1in]{geometry}

\begin{document}

\title{Analysis}
\author{Amanda E. Gentry}
\date{April 7, 2019}
\maketitle

\section{Introduction}
Some text\citep{Hoerl70}. More text\citep{Tibshirani96}. Even more text\citep{Zou05}.

Code section below:
<<loading, echo=FALSE, eval=TRUE, message=F, warning=F>>=
x <- seq(1:10)
summary(x)
@

\bibliography{Refs}
\bibliographystyle{plain}

\end{document}
@Article{Hoerl70,
  author={Arthur E. Hoerl and Robert W. Kennard},
  title={Ridge Regression: Biased Estimation for Nonorthogonal Problems},
  journal={Technometrics},
  volume={12},
  number={1},
  year={1970},
  pages={55-67}
}

@article{Tibshirani96,
	author={Robert Tibshirani},
	title={Regression Shrinkage and Selection via the Lasso},
	journal={Journal of the Royal Statistical Society, Series B},
	volume={58},
	number={1},
	year={1996},
	pages={267-288}
	}

@Article{Zou05,
  author={Hui Zou and Trevor Hastie},
  title={Regularization and variable selection via the elastic net},
  journal={Journal of the Royal Statistical Society Series B-Statistical Methodology},
  volume={67},
  number={Part 2},
  pages={301-320},
  year={2005}
}
0 Likes