# Manual bibliography in knitR with \bibitem{} works but cannot use \cite{} with it

I am trying to use a manual/embedded bibiography in a knitR/LaTeX document (long story short but for various reasons I don't want to be using a seperate .bib file because this script will be used many times and moved around etc).

The following code works. However, if I add \cite{edgeRRef} - let's say just after "this report", the compiling suddenly fails. I am at a loss, because all tutorials seem to say that \cite{} should work. Am I missing something? Are some of my other packages "interfering" with my \cite{}

I am using R and knitr to embed some code as well, I should point out.

Thanks.

\documentclass[12pt, a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\hypersetup{
urlcolor     = blue, %Colour for external hyperlinks
citecolor   = blue %Colour of citations
}
\usepackage{caption}
\setlength{\parindent}{0pt}
\usepackage{authblk}
\usepackage[nomarkers, nolists]{endfloat} %Positions figures at the end of the document and add no list of names (requires that chunk have fig.cap option)
\usepackage{soul} % Allows underline lines to be broken (use \ul{} instead of \underline{})

\usepackage{helvet} %Set up Arial as font
\renewcommand{\familydefault}{\sfdefault}

\newcommand{\Rfunction}[1]{{\texttt{#1}}}
\newcommand{\Rpackage}[1]{{\textit{#1}}}

\title{\textbf{My report}}
\author{Me}
\date{\today}

\begin{document}

\maketitle

\begingroup
\tableofcontents
\endgroup

\begingroup
\listoffigures
\endgroup

\newpage
\section{Introduction}
This report provides the results blah blah blah.

<<first-chunk>>
print("Hello world")
@

\newpage
\begin{thebibliography}{1}
\bibitem{edgeRRef} Hello, E. 1971
\end{thebibliography}

\end{document}


In your example the \end{document} is missing. If I insert this, it seems to work.
This report provides the results blah blah blah.\cite{edgeRRef}

This report provides the results blah blah blah.[1]