Learn R Programming

tidystats (version 0.6.3)

read_stats: Read a .json file that was produced with write_stats()

Description

read_stats() can read a .json file containing statistics that was produced using tidystats. It returns a list containing the statistics, with the identifier as the name for each list element.

Usage

read_stats(file)

Arguments

file

A string specifying the path to the tidystats data file.

Examples

Run this code
# A simple example, assuming there is a file called 'statistics.json'
if (FALSE) {
statistics <- read_stats("statistics.json")
}

# A working example
statistics <- read_stats(
  file = system.file("statistics.json", package = "tidystats")
)

Run the code above in your browser using DataLab