The University of Melbourne · FACULTY OF STATISTICS

CMCE10002 Chap.2 Reproducible Workflows in Posit Cloud and Quarto

- one subject, every graph, every model, every mark
5 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 2 of 13 · CMCE10002

Reproducible Workflows in Posit Cloud and Quarto

Everything runs in one shared environment

The subject uses R and RStudio through Posit Cloud, a browser-based environment that needs no installation, saves work online and is reachable from any device. The University covers the usage fee for the subject.

The consequence that matters is not convenience: the code you write is the code your tutor runs, so a result is expected to survive leaving your machine.

Console, script and document do different jobs

The class reference separates three places to type the same code. The console is good for trying things out and keeps nothing. A script saves and organises the instructions.

A Quarto document combines code, explanation and output, which is the form the group assignment eventually asks for.

What reproducible actually means here

A clean session, plus this file, plus this data, gives this output, with no manual step in between.

A document that renders only after something has been run by hand is not reproducible, and the first error on a clean run is almost always the one worth reading.

Where the subject keeps its own materials

Workbooks used in class and the completed versions of the lecture notes are published in the shared cloud project rather than only as slides, and the prescribed text is R for Data Science in its second edition.

Reading the completed notes after the demonstration is the cheapest revision available in this subject, because it shows the finished form of code you have already watched being built, with the reasoning still attached. Announcements, readings and tutorial solutions live on the subject site, and the subject guide holds the rules.

In this chapter

What this chapter covers

  • 01

    Posit Cloud as the shared environment for every exercise and assignment

  • 02

    Console, script and Quarto document, and what each one preserves

  • 03

    Loading packages so their functions exist for the session

  • 04

    Rendering from a clean session as the test of reproducibility

  • 05

    Reading the first error rather than the last one

Worked example · free

Diagnosing a document that refuses to render

Q [4 marks]. AskSia assigns four practice points to this independent exercise; they are not a University marking scheme. A document runs chunk by chunk but fails on render with an error saying an object cannot be found. Work out why and repair it.
  • 1State what rendering does to the session.
  • 1Explain why running chunks by hand hides the fault.
  • 1Give the diagnostic sequence in order.
  • 1Name the two usual causes.
Rendering starts a fresh session, so everything the document relies on must be created inside the document itself. Running chunks by hand builds objects up in the current session, which lets the document appear to work while depending on something never written down. Restart the session so the environment is empty, run from the top, and stop at the first error, because later errors are usually consequences of it. That first error names the missing object, and it is nearly always either a package loaded from the console instead of in the file, or a data object created during an earlier experiment.
Sia tip — Restart and render before you believe any result. Objects left in memory from earlier attempts are the reason a file works for its author and for nobody else.
Glossary

Key terms

Posit Cloud
The browser-based environment the subject uses to run R and RStudio without any local installation.
Quarto document
A document format that holds code, explanation and output together so the numbers in the text are produced by the code beside them.
Package
A bundle of extra functions that becomes available only after it is loaded for the session.
Reproducible analysis
An analysis that regenerates its own output from a clean session with no manual step in between.
FAQ

Reproducible Workflows in Posit Cloud and Quarto FAQ

Do students need to install R for this subject?

No local installation is required. All class exercises and assignments run through Posit Cloud in a web browser, the work is saved online so it can be reopened from any device, and the University covers the usage fee associated with the subject.

Why does a file render for one person and fail for another?

Usually because it depends on something that was created outside the file, such as a package loaded from the console or a data object made during an earlier experiment. Rendering starts an empty session, so anything not written in the document does not exist.

What is the difference between a script and a Quarto document?

A script saves the instructions and nothing else, which makes an analysis rerunnable but leaves no record of why any step was chosen. A Quarto document holds the code, the explanation and the output together, so the numbers a reader sees are produced by the code printed beside them rather than typed in by hand.

Study strategy

Exam move

Build the habit of restarting the session and running from line one before you trust any number. It costs a few seconds and it catches the single most common reason work fails when it leaves your screen. Before submitting anything, open the project fresh, restart, and render from the top. If that works, the analysis will survive being read by somebody else, which is the standard the group assignment is marked against.

Working through Reproducible Workflows in Posit Cloud and Quarto in CMCE10002? Sia is AskSia’s AI Statistics tutor — ask any CMCE10002 Reproducible Workflows in Posit Cloud and Quarto question and get a clear, step-by-step explanation grounded in how CMCE10002 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 74 of your The University of Melbourne subjects - and 1,000+ Bibles across every Australian university.
Sia - your CMCE10002 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works
Unlock the full CMCE10002 Bible + 74 The University of Melbourne subjects
$0.99 Trial