Package 'monash'

Title: Consolidated tools and templates for staff at Monash University
Description: Rmarkdown templates and other tools for use at Monash University, Department of Econometrics & Business Statistics.
Authors: Emi Tanaka [aut] (ORCID: <https://orcid.org/0000-0002-1455-259X>), Rob Hyndman [aut, cre] (ORCID: <https://orcid.org/0000-0002-2140-5352>), Mitchell O'Hara-Wild [ctb] (ORCID: <https://orcid.org/0000-0001-6729-7695>), Michael Lydeamore [aut] (ORCID: <https://orcid.org/0000-0001-6515-827X>)
Maintainer: Rob Hyndman <[email protected]>
License: GPL-3
Version: 0.0.0.9000
Built: 2026-05-23 22:20:53 UTC
Source: https://github.com/numbats/monash

Help Index


Create a simple travel diary for a Monash trip

Description

Creates a simple travel diary (consisting of one destination) for a trip. Used in conjunction with render_travel_diary() to generate a PDF travel diary for uploading.

Usage

create_simple_travel_diary(
  start_date,
  end_date,
  start_city = "Melbourne",
  destination,
  reason
)

Arguments

start_date

The start date of the trip (as a Date object).

end_date

The end date of the trip (as a Date object).

start_city

The city where the trip starts (default is "Melbourne").

destination

The destination city for the trip.

reason

The reason for the trip (e.g., "Conference", "Meeting").

Value

A data frame representing the travel diary, with columns for Date, Location, and Description.

Examples

create_simple_travel_diary(
  start_date = as.Date("2025-08-18"), 
  end_date = as.Date("2025-09-01"), 
  destination = "Perth", 
  reason = "NUMBATS Conference")

Output formats for Monash EBS documents

Description

Each function is a wrapper for pdf_document2 to produce documents in Monash EBS style.

Usage

letter(...)

exam(...)

workingpaper(...)

report(...)

memo(...)

Arguments

...

Arguments passed to pdf_document2.

Value

An R Markdown output format object.

Author(s)

Rob J Hyndman


Get Monash logo

Description

A quick way of getting the Monash logo.

Usage

logo_get(
  path = ".",
  stack = TRUE,
  color = c("blue", "black", "white"),
  type = c("png", "jpg", "ai"),
  hq = FALSE,
  overwrite = TRUE,
  filename = NULL
)

Arguments

path

the path to save the file to

stack

TRUE for stacked logo, FALSE for one-line logo

color

blue, black or white

type

png, jpg or ai

hq

TRUE for high-quality image (larger file size)

overwrite

TRUE for overwriting (should it enquire?), FALSE for not. Not implemented yet.

filename

A new file name for the logo. Not implemented yet.

Source

https://www.monash.edu/brandbook/brand-elements/our-logo


Monash brand colors

Description

Monash brand colors

Usage

color_all() # show both primary and secondary colors

color_show(print = TRUE)

color_primary()

color_secondary()

Arguments

print

whether to print the color vector

Primary palette

  • Monash Blue is our most identifiable colour. It conveys youthfulness, possibility and openness. It should always be considered first.

  • Black conveys prestige, timelessness and sophistication.

  • White is often shown as white space and conveys the brand personality of being open and youthful.

  • Greys can be any percentage of black and provides additional flexibility to our primary colour palette.

The primary colour palette is preferred for digital work.

Secondary palette

Inspired by the colours of our academic robes, we have a range of bright, colourful secondary colours.

Secondary colours are to be used:

  • in charts and diagrams to highlight key findings

  • as headings and subheadings

  • sparingly to provide highlights or accents – ideally one or two secondary colours per double page spread

  • to speak to a particular audience group. For instance, colours that would resonate best with our prospective undergraduate audience would be colourful, bright and youthful. Industry and research would suit a more corporate/mature choice to reflect focus and prestige.


List of Quarto templates available

Description

This function lists the Monash Quarto templates available.

Usage

quarto_template_use(
  type = c("report", "workingpaper", "thesis", "memo", "letter", "exam"),
  dir = type
)

quarto_template_install(
  type = c("report", "workingpaper", "thesis", "memo", "letter", "exam")
)

quarto_template_add(
  type = c("report", "workingpaper", "thesis", "memo", "letter", "exam")
)

Arguments

type

One of either "report", "workingpaper", "thesis", "memo", or "letter".

dir

The name of the directory to put the template in. The directory should not exist.

Examples

## Not run: 
quarto_template_use("report", dir = "myreport")
quarto_template_install("workingpaper")
quarto_template_add("thesis")

## End(Not run)

Release materials

Description

Release materials

Usage

release_lecture(
  week,
  dir = "tutorials",
  output_dir = "release",
  ignore = getOption("monash.lecture.ignore"),
  interactive = rlang::is_interactive(),
  overwrite = TRUE
)

release_tutorial(
  week,
  dir = "tutorials",
  output_dir = "release",
  ignore = getOption("monash.tutorial.ignore"),
  interactive = rlang::is_interactive(),
  overwrite = TRUE
)

release_tutorial_solution(
  week,
  dir = "tutorials",
  output_dir = "release",
  ignore = getOption("monash.tutorial.ignore"),
  interactive = rlang::is_interactive(),
  overwrite = TRUE
)

Arguments

week

the week number

dir

the subdirectory where the file is

output_dir

the directory where the release folder is

ignore

the file paths to ignore

interactive

not used yet

overwrite

should the files be overwritten?

Examples

## Not run: 
release_lecture(9) # to release week 9 lecture
release_tutorial(9) # to release week 9 tutorial
release_tutorial_solution(9) # to release week 9 tutorial solution

## End(Not run)

Render a travel diary to PDF

Description

Renders a travel diary to a PDF file using R Markdown. The travel diary must be created with create_simple_travel_diary().

Usage

render_travel_diary(
  travel_diary,
  name,
  department = "Department of Econometrics and Business Statistics",
  output_path = getwd(),
  output_file,
  ...
)

Arguments

travel_diary

A data frame representing the travel diary, created with create_simple_travel_diary().

name

The name of the person for whom the travel diary is created.

department

The department name (default is "Department of Econometrics and Business Statistics").

output_path

The directory where the PDF will be saved (default is the current working directory).

output_file

The name of the output PDF file (without extension).

...

Additional arguments passed to rmarkdown::render().

Examples

if (interactive()) {
diary <- create_simple_travel_diary(
   start_date = as.Date("2025-08-18"), 
   end_date = as.Date("2025-09-01"), 
   destination = "Perth", 
   reason = "NUMBATS Conference") |> 
render_travel_diary(output_file = "test.pdf", name = "Michael")
}

Link attendance record to google sheet

Description

Link attendance record to google sheet

Usage

zoom_attendance(.data, .sheet, sheetname = "Lecture", week, upload = FALSE)

Arguments

.data

The summary data frame with email, total and letter grade.

.sheet

The link to the googlesheet

sheetname

The name of the sheet

week

The week number

upload

Should the attendance be uploaded to a Google sheet?


Process the data frame from zoom meeting to total duration of attendance

Description

Process the data frame from zoom meeting to total duration of attendance

Usage

zoom_process(
  .data,
  start = NA,
  end = NA,
  length = 120,
  accept = c(A = length * 1/2, P = length * 3/4)
)

Arguments

.data

Data frame

start, end

A date time of when the zoom meeting started or ended. If NA, this is ignored. If the date time is supplied, then the time is censored.

length

The total length of the session in minutes.

accept

A named numeric vector that signifies the minimum required amount for the letter grade.


This reads in the zoom report

Description

The zoom meeting report is expected to have the meeting information and uncheck the "unique users" so that the record for start and end time exists. The latter is required so that total time for students is recorded from the start of the lecture to the end of the time and not because the student happens to be lingering before/after.

Usage

zoom_read(file, info = TRUE, date_format = "%m/%d/%Y %I:%M:%S %p")

Arguments

file

The file name for the zoom meeting report.

info

TRUE or FALSE of whether the meeting information is included in the file.

date_format

A date format specification. See readr::parse_datetime() for more details.

Details

In order to identify the student, the zoom meeting should be set to authenticate and restricted to Monash id alone. This makes the data linkage easier with record in LMS.