c3dr

Read and write C3D motion capture data in R

https://github.com/ropensci/c3dr

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.6%) to scientific vocabulary

Keywords

r r-package r-stats
Last synced: 6 months ago · JSON representation ·

Repository

Read and write C3D motion capture data in R

Basic Info
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 4
  • Open Issues: 0
  • Releases: 4
Topics
r r-package r-stats
Created over 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Citation Codemeta

README.md

c3dr

Project Status: Active – The project has reached a stable, usable
state and is being actively
developed. Status at rOpenSci Software Peer
Review CRAN
status DOI R-CMD-check codecov <!-- badges: end -->

Overview

An R package for working with motion capture data based on the C++ library EZC3D.

Background

C3D (https://www.c3d.org/) is a file format for biomechanical data, namely motion capture recordings with additional analog data (e.g., from force plates or electromyography).

The c3dr package allows to read, analyze and write C3D files in R (https://www.r-project.org/about.html), a programming language popular for statistical analyses and data visualization. c3dr is build on the open-source C++ library EZC3D (https://github.com/pyomeca/ezc3d).

For more information, read the Get Started vignette.

Installation

Install the c3dr package from CRAN:

r install.packages("c3dr")

Alternatively, you can the latest development version from R-Universe:

r install.packages("c3dr", repos = "https://ropensci.r-universe.dev")

Usage

Read Data

``` r library(c3dr)

get example data. Insert your file path instead, e.g.

path <- "folder/myfilename.c3d"

path <- c3d_example()

import data

d <- c3d_read(path) d

> A c3d object with

> - 55 data points and 340 frames

> - 1.70 s measurement duration (200 fps)

> - 69 analog channels (2000 fps)

> - 2 force platforms with 3400 frames

structure of the imported object

str(d, max.level = 1)

> List of 6

> $ header :List of 6

> $ parameters :List of 7

> $ data :List of 340

> $ residuals : num [1:340, 1:55] 1280 1280 1280 1280 1280 ...

> $ analog :List of 340

> $ forceplatform:List of 2

> - attr(*, "class")= chr [1:2] "c3d" "list"

read point data

p <- c3d_data(d) p[1:5, 1:5]

> LIASx LIASy LIASz LIPSx LIPSy

> 1 -220.1226 306.4248 846.3361 -398.1731 237.0688

> 2 -212.4696 306.5356 844.6985 -390.7831 237.8691

> 3 -204.8696 306.6555 843.2342 -383.1857 238.6758

> 4 -197.1952 306.8035 841.6127 -375.7068 239.5434

> 5 -189.6655 307.0628 840.1692 -368.1680 240.4141

alternative long data format

plong <- c3ddata(d, format = "long") p_long[1:5, 1:5]

> frame type LIAS LIPS R_IPS

> 1 1 x -220.1226 -398.1731 -392.8751

> 2 1 y 306.4248 237.0688 146.2103

> 3 1 z 846.3361 872.8574 880.3161

> 4 2 x -212.4696 -390.7831 -385.6659

> 5 2 y 306.5356 237.8691 147.1048

read analog data

a <- c3d_analog(d) a[1:5, 41:43]

> EMG 1 EMG 2 EMG 3

> 1 -3.601184e-05 7.324442e-06 1.647999e-05

> 2 4.638813e-05 8.697775e-06 1.533555e-05

> 3 1.280251e-04 1.007111e-05 1.449629e-05

> 4 1.841029e-04 1.190222e-05 1.350444e-05

> 5 1.898251e-04 1.464888e-05 1.190222e-05

read data from first force platform

d$forceplatform[[1]]$forces[1:5, ]

> [,1] [,2] [,3]

> [1,] 0.13992119 0.0461483 -0.1835251

> [2,] 0.13992119 -0.0461483 0.0000000

> [3,] 0.09328079 0.1845932 -0.1835251

> [4,] 0.04664040 -0.1384449 0.0000000

> [5,] 0.04664040 -0.2768898 0.5505753

write data to a new c3d file

c3d_write(d, "newfile.c3d")

```

Citation

r citation("c3dr")

To cite c3dr in publications use:

  Simon Nolte (2025). c3dr: Work with motion capture data in R. R
  package Version 0.2.0. DOI: 10.5281/zenodo.14870399.
  https://docs.ropensci.org/c3dr/

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {c3dr: Work with motion capture data in R},
    author = {Simon Nolte},
    year = {2025},
    url = {https://docs.ropensci.org/c3dr/},
    doi = {10.5281/zenodo.14870399},
    note = {R package version 0.2.0},
  }

Acknowledgements

The following people have contributed to this package by providing raw data files, testing code, suggesting features and/or reviewing the package: Björn Braunstein, July Pilowsky, Theresa Siepe, Michael Schwartz, Aymeric Stamm.

Contributing

If you consider contributing to this package, read the CONTRIBUTING.md. Please note that this package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Funding

This project was funded by the Internal Research Funds of the German Sport University Cologne, grant agreement number L-11-10011-289-154000.

Owner

  • Name: rOpenSci
  • Login: ropensci
  • Kind: organization
  • Email: info@ropensci.org
  • Location: Berkeley, CA

JOSS Publication

c3dr: An R Package to Read and Write C3D Motion Capture Files
Published
February 11, 2026
Volume 11, Issue 118, Page 9951
Authors
Simon Nolte ORCID
Institute of Movement and Neurosciences, German Sport University Cologne, Cologne, Germany
Editor
Arfon Smith ORCID
Tags
C3D biomechanics kinematics motion capture

Citation (CITATION.cff)

# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------
 
cff-version: 1.2.0
message: 'To cite package "c3dr" in publications use:'
type: software
license: MIT
title: 'c3dr: Read and Write C3D Motion Capture Files'
version: 0.2.0
doi: 10.5281/zenodo.14870399
identifiers:
- type: doi
  value: 10.32614/CRAN.package.c3dr
abstract: A wrapper for the 'EZC3D' library to work with C3D motion capture data.
authors:
- family-names: Nolte
  given-names: Simon
  email: s.nolte@dshs-koeln.de
  orcid: https://orcid.org/0000-0003-1643-1860
preferred-citation:
  type: manual
  title: 'c3dr: Work with motion capture data in R'
  authors:
  - family-names: Nolte
    given-names: Simon
    email: s.nolte@dshs-koeln.de
    orcid: https://orcid.org/0000-0003-1643-1860
  year: '2025'
  url: https://docs.ropensci.org/c3dr/
  doi: 10.5281/zenodo.14870399
  notes: R package version 0.2.0
repository: https://CRAN.R-project.org/package=c3dr
repository-code: https://github.com/ropensci/c3dr
url: https://docs.ropensci.org/c3dr/
contact:
- family-names: Nolte
  given-names: Simon
  email: s.nolte@dshs-koeln.de
  orcid: https://orcid.org/0000-0003-1643-1860
keywords:
- r
- r-package
- r-stats
references:
- type: software
  title: Rcpp
  abstract: 'Rcpp: Seamless R and C++ Integration'
  notes: LinkingTo
  url: https://www.rcpp.org
  repository: https://CRAN.R-project.org/package=Rcpp
  authors:
  - family-names: Eddelbuettel
    given-names: Dirk
    email: edd@debian.org
    orcid: https://orcid.org/0000-0001-6419-907X
  - family-names: Francois
    given-names: Romain
    orcid: https://orcid.org/0000-0002-2444-4226
  - family-names: Allaire
    given-names: JJ
    orcid: https://orcid.org/0000-0003-0174-9868
  - family-names: Ushey
    given-names: Kevin
    orcid: https://orcid.org/0000-0003-2880-7407
  - family-names: Kou
    given-names: Qiang
    orcid: https://orcid.org/0000-0001-6786-5453
  - family-names: Russell
    given-names: Nathan
  - family-names: Ucar
    given-names: Iñaki
    orcid: https://orcid.org/0000-0001-6403-5550
  - family-names: Bates
    given-names: Doug
    orcid: https://orcid.org/0000-0001-8316-9503
  - family-names: Chambers
    given-names: John
  year: '2025'
  doi: 10.32614/CRAN.package.Rcpp
- type: software
  title: testthat
  abstract: 'testthat: Unit Testing for R'
  notes: Suggests
  url: https://testthat.r-lib.org
  repository: https://CRAN.R-project.org/package=testthat
  authors:
  - family-names: Wickham
    given-names: Hadley
    email: hadley@posit.co
  year: '2025'
  doi: 10.32614/CRAN.package.testthat
  version: '>= 3.0.0'
- type: software
  title: quarto
  abstract: 'quarto: R Interface to ''Quarto'' Markdown Publishing System'
  notes: Suggests
  url: https://quarto-dev.github.io/quarto-r/
  repository: https://CRAN.R-project.org/package=quarto
  authors:
  - family-names: Allaire
    given-names: JJ
    email: jj@posit.co
    orcid: https://orcid.org/0000-0003-0174-9868
  - family-names: Dervieux
    given-names: Christophe
    email: cderv@posit.co
    orcid: https://orcid.org/0000-0003-4474-2498
  year: '2025'
  doi: 10.32614/CRAN.package.quarto

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "c3dr",
  "description": "A wrapper for the 'EZC3D' library to work with C3D motion capture data.",
  "name": "c3dr: Read and Write C3D Motion Capture Files",
  "relatedLink": [
    "https://docs.ropensci.org/c3dr/",
    "https://CRAN.R-project.org/package=c3dr"
  ],
  "codeRepository": "https://github.com/ropensci/c3dr",
  "issueTracker": "https://github.com/ropensci/c3dr/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "0.2.0",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.5.1 (2025-06-13 ucrt)",
  "provider": {
    "@id": "https://cran.r-project.org",
    "@type": "Organization",
    "name": "Comprehensive R Archive Network (CRAN)",
    "url": "https://cran.r-project.org"
  },
  "author": [
    {
      "@type": "Person",
      "givenName": "Simon",
      "familyName": "Nolte",
      "email": "s.nolte@dshs-koeln.de",
      "@id": "https://orcid.org/0000-0003-1643-1860"
    }
  ],
  "copyrightHolder": [
    {
      "@type": "Person",
      "givenName": "Benjamin",
      "familyName": "Michaud"
    }
  ],
  "funder": [
    {
      "@type": "Organization",
      "name": "German Sport University Cologne"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Simon",
      "familyName": "Nolte",
      "email": "s.nolte@dshs-koeln.de",
      "@id": "https://orcid.org/0000-0003-1643-1860"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 3.0.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "quarto",
      "name": "quarto",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=quarto"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "Rcpp",
      "name": "Rcpp",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=Rcpp"
    },
    "SystemRequirements": null
  },
  "fileSize": "18550.916KB",
  "citation": [
    {
      "@type": "SoftwareSourceCode",
      "datePublished": "2025",
      "author": [
        {
          "@type": "Person",
          "givenName": "Simon",
          "familyName": "Nolte"
        }
      ],
      "name": "c3dr: Work with motion capture data in R",
      "identifier": "10.5281/zenodo.14870399",
      "url": "https://docs.ropensci.org/c3dr/",
      "description": "R package version 0.2.0",
      "@id": "https://doi.org/10.5281/zenodo.14870399",
      "sameAs": "https://doi.org/10.5281/zenodo.14870399"
    }
  ],
  "releaseNotes": "https://github.com/ropensci/c3dr/blob/main/NEWS.md",
  "readme": "https://github.com/ropensci/c3dr/blob/main/README.md",
  "contIntegration": [
    "https://github.com/ropensci/c3dr/actions/workflows/R-CMD-check.yaml",
    "https://app.codecov.io/gh/ropensci/c3dr"
  ],
  "developmentStatus": "https://www.repostatus.org/#active",
  "review": {
    "@type": "Review",
    "url": "https://github.com/ropensci/software-review/issues/686",
    "provider": "https://ropensci.org"
  },
  "keywords": [
    "r",
    "r-package",
    "r-stats"
  ]
}

GitHub Events

Total
  • Release event: 3
  • Delete event: 2
  • Push event: 22
  • Pull request event: 8
  • Fork event: 1
  • Create event: 3
Last Year
  • Release event: 3
  • Delete event: 2
  • Push event: 22
  • Pull request event: 8
  • Fork event: 1
  • Create event: 3

Packages

  • Total packages: 1
  • Total downloads:
    • cran 488 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: c3dr

Read and Write C3D Motion Capture Files

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 488 Last month
Rankings
Dependent packages count: 26.5%
Dependent repos count: 32.6%
Average: 48.6%
Downloads: 86.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
  • codecov/codecov-action v4 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • Rcpp * imports
  • quarto * suggests
  • testthat >= 3.0.0 suggests