
This handbook provides a comprehensive guide for installing, configuring, and using Positron, Quarto, and Zotero for writing quantitative academic research papers.
1 Installation
This section will guide you through the installation and setup of Positron, Quarto, and Zotero for writing quantitative academic research papers.
1.1 Install R & Positron & Quarto
First, we need to download and install R, Positron and Quarto.
Follow the instructions on CRAN mirror to download and install R.
Follow the instructions on Positron Download to download Positron.
Run SETUP and install Positron. Check all of the boxes when asked to.
- Follow the instructions on Quarto Get Started to download and install Quarto.
1.2 Set up System Environment Variables
Next, we need to set up the system environment variables for proxys.
Open the Windows Start Menu and search for
Env
.Click on
Edit the system environment variables
.In the System Properties window, click on the
Environment Variables
button.In the Environment Variables window, under the
System variables
section, click on theNew
button.In the New System Variable window, enter
HTTP_PROXY
as the Variable name andhttp://127.0.0.1:xxxx
as the Variable value. Click OK. (Replacexxxx
with the port number you are using for your proxy.)Repeat step 5 to create another system variable named
HTTPS_PROXY
with the same valuehttp://127.0.0.1:xxxx
.Repeat step 5 to create another system variable named
NO_PROXY
with the valuelocalhost,127.0.0.1
.Click OK to close the Environment Variables window. Click OK to close the System Properties window.
1.3 Join Github Eduction
To use Github Copilot, we need to join the Github Education program.
Open your web browser and go to GitHub Education.
Click on the
Join GitHub Education
button.Follow the instructions to verify your student status and complete the application process.
1.4 Update Positron and Set Up Github Copilot Chat
Now, we need to update Positron and set up Github Copilot Chat.
Open Positron.
Click on the
Manage
Icon on the bottom left corner.Click on
Settings
to open the Settings tab.In the Settings tab, search for
channel
, and switch thereleases
todailies
.Click on the
Manage
Icon on the bottom left corner. Click onCheck for Updates
to update Positron to the latest version. After the update is complete, restart Positron.Repeat step 2 & 3 to open the Settings tab again.
In the Settings tab, search for
assistant
. Check on the boxEnable Positron Assistant
.Click on the
Chat
Icon on the left sidebar to open the Chat tab.In the Chat tab, click on
add model provider
button.In the Configure Language Model Provider window, select
GitHub Copilot
. Click onSign in
.In the GitHub login page, enter your GitHub credentials to sign in.
After signing in, you will be redirected back to Positron. You can now use the LLMs provided by GitHub Copilot to assist with your coding.
1.5 Install R Package Manager
Next, we need to install the R Package Manager to manage R packages.
Open Positron. Click on the
Extensions
Icon on the left sidebar.Search for
Positron R Package Manager
. Click onInstall
to install the extension.Once the extension is installed and activated, you can find the R Package Manager 📖 icon on the left sidebar.
Drag the 📖 icon to the secondary sidebar on the right.
1.6 Install Zotero
Finally, we need to download and install Zotero for managing references.
Download the Zotero installer for your operating system from the Zotero Download page.
Run the installer and follow the on-screen instructions to complete the installation.
Open Zotero, go to
Edit
-Preferences
, create and log into an account to sync your references. ClickNew Collection
in the top left corner to create a new collection in My Library, then click the magic wand icon on the right to add any literature by DOI to that collection.Download and extract the Zotero Addons plugin.
Open Zotero, click on
Tools
in the top menu bar, selectAdd-ons
, click thegear
icon, selectInstall Add-on From File
, and choose the.xpi
file downloaded in step 4.Select
Tools
-Add-on Market
, install theBetter BibTeX for Zotero
plugin for better BibTeX support.In the library, right-click on the title bar and check
Citation Key
to display citation names.Select
Edit
-Preferences
-Better BibTeX
, in theCitation key format
, keepauth.lower + year
.Right-click on the literature library you want to export, select
Export Collection
, checkKeep updated
, name the filereferences.bib
and save it to your paper project folder.
2 Usage
This section will guide you through the usage of Positron, Quarto, and Zotero for writing quantitative academic research papers.
2.1 Fetch ORCID Template
Now, every time before you start writing a new paper, we could install the ORCID template for better formatting.
Open Positron, create a qmd file as your transcript. Click on
TERMINAL
on the bottom sidebar.In the terminal, type the following command and press Enter:
quarto add kv9898/orcid
.Enter
Y
when asked to trust the authors and to continue.You can now work on an ORCID template. Copy and paste the example syntax from here: ORCID Template.
Click
Preview
on the top bar to try compile the document. Follow the instructions on the terminal to install any missing packages.
2.2 YAML header
You can make changes to the default YAML header to fit your needs. Refer to the comments on the code in the template for more information.
---
: Orcid Template #Change article title
title: with affiliation #Change article subtitle
subtitle: last-modified #Set article date to last modified time, or manually set to specific date, e.g., '2024-06-01'
date:
authors- name: Dianyi Yang #Change author name
: dianyi.yang@politics.ox.ac.uk #Change author email
email: 0009-0004-4652-3429 #Change author ORCID
orcid: #Change author affiliations
affiliations- ref: ox #Select affiliation, must match id in affiliations section below
- ref: sec #Select affiliation, must match id in affiliations section below
: true #Set as corresponding author
corresponding-contributor: true #Set as equal contributor
equal- name: Yang Dianyi #Can add multiple authors
: 0009-0004-4652-3429
orcid:
affiliations- ref: ox
- name: Someone else
:
affiliations- ref: ox
- ref: sec
: 0009-0009-9108-5436
orcid-contributor: true
equal
: #Set affiliations
affiliations- id: ox #Change affiliation code
: Department of Politics and International Relations, University of Oxford
name- id: sec #Can set multiple affiliations
: Second Institute
name: #Choose compilation format
format#native: default #Compile to native HTML format
#docx: default #Compile to Word format
-pdf: #Compile to PDF format
orcid-tex: true #Choose whether to keep .tex file, usually required for journal submission
keep-sections: true #Choose whether to number sections
number: false #Choose whether to include cover, if true, value is cover.pdf
cover: false #Choose whether to include table of contents
toc-newpage: false #Choose whether table of contents starts on new page
toc: references.bib #Set bibliography file
bibliography: extra/apa.csl #Set citation format
csl: This is an abstract. #Modify abstract content
abstract: a, b, c #Modify keywords
keywords: This is an acknowledgement. #Modify acknowledgements content
acknowledgements---
2.3 An Example Regression Analysis
Here is an example regression analysis using the ORCID template and the mtcars dataset to show you some basic syntax when you are writing a quantitative academic research paper.
First, let’s examine the relationship between car weight and fuel efficiency using a scatter plot.
Insert an r code cell by clicking the Insert Code Cell
button on the top bar, and copy and paste the following code into the code cell:
# Assign a label to the scatter plot for cross-referencing
# Labels for figures should have the prefix "fig-"
#| label: fig-scatter
# Assign a caption to the scatter plot
#| fig-cap: "Relationship between Car Weight and Fuel Efficiency"
# Set echo, warning, and message to false for the plot output only
#| echo: false
#| warning: false
#| message: false
# Install the necessary packages
install.packages(c("ggplot2", "dplyr"))
# If the packages are already installed, you can skip the above line
library(ggplot2)
library(dplyr)
# Create descriptive statistics plot
ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point(aes(color = factor(cyl)), size = 3) +
geom_smooth(method = "lm", se = TRUE, color = "blue") +
labs(
x = "Weight (1000 lbs)",
y = "Miles per Gallon",
color = "Cylinders"
+
) theme_minimal()

Next, we’ll perform a regression analysis. Equations written in syntax should be covered by double dollar signs $$ ... $$
and be assigned a label using {#label}
for cross-referencing.
$$
= \beta_0 + \beta_1 \cdot weight + \beta_2 \cdot cylinders + \epsilon
mpg $$ {#eq-regression} #Labels for equations should have the prefix "eq-"
\[ mpg = \beta_0 + \beta_1 \cdot weight + \beta_2 \cdot cylinders + \epsilon \tag{1}\]
We can also use &
to align equations. For example, if we want our equations to be aligned at the equal signs and quote them as one group, we can write:
$$
\begin{aligned}1+2&=3\\
3+4&=7\\
11&=5+6
\end{aligned}$$ {#eq-group}
Note that here we use \begin{aligned} ... \end{aligned}
to align a group of equations, and we use \\
to indicate line breaks, and &
to indicate the alignment point.
The three equations are now quoted as one group and aligned at the equal signs:
\[ \begin{aligned} 1+2&=3\\ 3+4&=7\\ 11&=5+6 \end{aligned} \tag{2}\]
Finally, let’s create a regression table to summarize our regression results. We will use the modelsummary
package to create a well-formatted regression table.
# Assign a label to the regression table for cross-referencing
# Labels for tables should have the prefix "tbl-"
#| label: tbl-regression
# Assign a caption to the regression table
#| tbl-cap: "Regression Results: Fuel Efficiency Model"
# Set echo, warning, and message to false for the plot output only
#| echo: false
#| warning: false
#| message: false
library(modelsummary)
# Fit regression models
<- lm(mpg ~ wt, data = mtcars)
model1 <- lm(mpg ~ wt + cyl, data = mtcars)
model2 <- lm(mpg ~ wt + cyl + hp, data = mtcars)
model3 # Create regression table
modelsummary(
list("Model 1" = model1, "Model 2" = model2, "Model 3" = model3),
stars = TRUE,
gof_map = c("nobs", "r.squared", "adj.r.squared")
)
Model 1 | Model 2 | Model 3 | |
---|---|---|---|
+ p < 0.1, * p < 0.05, ** p < 0.01, *** p < 0.001 | |||
(Intercept) | 37.285*** | 39.686*** | 38.752*** |
(1.878) | (1.715) | (1.787) | |
wt | -5.344*** | -3.191*** | -3.167*** |
(0.559) | (0.757) | (0.741) | |
cyl | -1.508** | -0.942+ | |
(0.415) | (0.551) | ||
hp | -0.018 | ||
(0.012) | |||
Num.Obs. | 32 | 32 | 32 |
R2 | 0.753 | 0.830 | 0.843 |
R2 Adj. | 0.745 | 0.819 | 0.826 |
The equations, figures, and tables are automatically numbered in a correct sequence, and could be cross-referenced in the text.
To create proper cross-references in Quarto, use the following syntax: @label
at where you want to make cross references, where label is the label you assigned to the figure, table, or equation. For instance, @eq-regression
refers to the regression equation Equation 1, @eq-group
refers to the group of equations Equation 2, @fig-scatter
refers to the scatter plot Figure 1, and @tbl-regression
refers to the regression table Table 1. You could refer to Quarto Cross-References Documentation for more information on cross-reference.
2.4 An Example Literature Review
Here is an example of how to use Quarto for literature citations.
First, make sure you have added the references.bib
file to your project according to the previous instructions in Section 1.6, and correctly set the bibliography
field in the YAML header.
Second, make sure you have downloaded and installed the corresponding citation format *.csl
file, and correctly set the csl
field in the YAML header. Citation formats can be downloaded from the CSL repository.
Now, you can use @citation_key
in the text to cite literature. We can place citations at the beginning of sentences. For example:
@lake2011
Lake (2011) argues that the “isms” debate in international relations research is harmful.
Or, we can also place citations at the end of sentences:
The “isms” debate in international relations research is harmful [@lake2011]
(Lake, 2011).
To cite multiple articles, use comma-separated citation keys, for example:
Here are two good articles [@lake2011, @hale2020]
(Hale, 2020; Lake, 2011).
Finally, add the following content at the end of the document to generate a reference list:
# References {.unnumbered} #Add unnumbered references section
::: {#refs} #Place references here, not at the end of document
:::
References
Reuse
Citation
@online{fu2025,
author = {Fu, Yuxin and Yang, Dianyi},
title = {Research 101: {How} to Work as a Modern Quantitative Social
Scientist?},
date = {2025-09-27},
url = {https://bim382.github.io/blog/2025-09-27-PositronHandbook/},
langid = {en}
}