R Under development (unstable) (2024-09-21 r87186 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(ChestVolume) > > data(sample_data) > > # Step 1: Process the marker data and convert from mm to cm > processed_data <- process_marker_data(sample_data, convert_to_cm = TRUE) > > # Step 2: Adjust the marker positions by moving them 1 cm toward the chest center > adjusted_data <- adj_position(processed_data, distance = 1) > > # Step 3: Define the chest segments (example with one segment) > segments <- list( + upper_left = c("M01", "M02", "M04", "M05","M07", "M08","M10", "M11") + ) > > # Step 4: Calculate the chest segment volumes > volumes <- calculate_volumes(adjusted_data, segments) > > # Step 5: Visualize the chest expansion in 3D > plot_chest_3d(adjusted_data, segments, selected_segment = 'upper_left') > > # Step 6: Plot the chest volume changes over time > plot_2d_volume(volumes, 'Segment') > > proc.time() user system elapsed 10.28 3.10 13.40