Learn R Programming

ChestVolume (version 1.0.1)

read_segment_definitions: Read Segment Definitions from Excel File

Description

Reads an Excel file defining the markers in each segment and creates a list suitable for use with plot_chest_3d and calculate_segment_volumes functions.

Usage

read_segment_definitions(filepath)

Value

A named list where each element is a character vector of marker names defining a segment.

Arguments

filepath

A string specifying the path to the Excel file containing segment definitions.

Details

The Excel file should have a specific format:

  • Each row represents a segment.

  • The first column contains the segment names.

  • Subsequent columns contain the marker names belonging to each segment.

Missing marker entries can be left blank or filled with NA.

Examples

Run this code
# 'segment_def.xlsx' is the Excel file with segment definitions
path <- system.file("extdata", "segment_def.xlsx", package="ChestVolume")
segments <- read_segment_definitions(path)
head(segments)

Run the code above in your browser using DataLab