在natbib中编译带有引用的.Rnw文件时,RStudio不会编写.bbl文件

在natbib中编译带有引用的.Rnw文件时,RStudio不会编写.bbl文件,r,latex,rstudio,knitr,sweave,R,Latex,Rstudio,Knitr,Sweave,我在RStudio中有一个带引用的.Rnw文件(Test.Rnw)。.bib文件与.Rnw文件位于同一文件夹中,但当我编译.Rnw文件时,没有写出.bbl文件,我得到错误: There were undefined citations 检查日志,我发现,正如预期的那样: No file Test.bbl 这是我试图编译的代码: \documentclass[12pt, oneside]{article} \usepackage{amsmath,amsfonts,amssymb} \usepa

我在RStudio中有一个带引用的.Rnw文件(Test.Rnw)。.bib文件与.Rnw文件位于同一文件夹中,但当我编译.Rnw文件时,没有写出.bbl文件,我得到错误:

There were undefined citations
检查日志,我发现,正如预期的那样:

No file Test.bbl
这是我试图编译的代码:

\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}
这是错误消息的屏幕抓取:


如果单击控制台窗格中的“问题”,您是否看到其他问题?当我运行它时,bbl文件被创建(但是我得到关于缺少引用的警告,因为我没有创建真正的
Refs.bib
文件)。@user2554330我添加了错误消息的快照(我只得到我提到的一条以及三条引用中每一条的3条“未定义引用”)以及我正在使用的.bib文件。感谢您的澄清。代码似乎工作正常。您的文件夹中是否有
.blg
文件?如果是,请显示内容。@samcarter文件夹中似乎没有.blg文件。@a.E.Gentry确定,那么问题可能是bibtex没有运行。你能在某处选择rstudio使用哪些命令来编译你的文件吗?
@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}
}