read.markups.json: Import a JSON file into R

View source: R/read.markups.json.r

read.markups.jsonR Documentation

Import a JSON file into R

Description

This function imports a JSON file into R. It utilizes function "fromJSON" from the package "jsonlite" to read a JSON file.

Usage

read.markups.json(file = NULL)

Arguments

file

The file path that leads to a particular JSON file.

Value

An array/matrix that contains the landmark coordinates.
Row numbers = number of landmarks;
Column numbers = dimensions of the landmark coordinates
Row names are assigned from the labels in the FCSV file
Column names are assigned as "x", "y", and "z", depending on the dimension

Examples

lms = read.markups.json(file = url("https://raw.githubusercontent.com/SlicerMorph/SampleData/master/Gorilla_template_LM1.json"))
#Return a 41x3 matrix; rownames = labels in the FCSV file; colnames = "x", "y", "z"

chz31/SlicerMorphR documentation built on Feb. 10, 2023, 11:56 p.m.