{"id":32207254,"url":"https://github.com/smwindecker/mixchar","last_synced_at":"2025-10-22T05:50:26.652Z","repository":{"id":56937172,"uuid":"103010631","full_name":"smwindecker/mixchar","owner":"smwindecker","description":"Repository for the R package 'mixchar'","archived":false,"fork":false,"pushed_at":"2023-09-14T01:33:30.000Z","size":15974,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-12T07:27:01.809Z","etag":null,"topics":["decay","thermogravimetry","traits"],"latest_commit_sha":null,"homepage":"https://smwindecker.github.io/mixchar","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smwindecker.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-09-10T07:06:50.000Z","updated_at":"2025-08-25T16:39:19.000Z","dependencies_parsed_at":"2024-01-02T11:07:34.608Z","dependency_job_id":"11458fc2-8953-439b-b89d-8ffcf3555900","html_url":"https://github.com/smwindecker/mixchar","commit_stats":{"total_commits":345,"total_committers":7,"mean_commits":"49.285714285714285","dds":"0.10434782608695647","last_synced_commit":"8e26d64d6603e583e6cbcddb1ea6123cd130963f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/smwindecker/mixchar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smwindecker%2Fmixchar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smwindecker%2Fmixchar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smwindecker%2Fmixchar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smwindecker%2Fmixchar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smwindecker","download_url":"https://codeload.github.com/smwindecker/mixchar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smwindecker%2Fmixchar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280389295,"owners_count":26322507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decay","thermogravimetry","traits"],"created_at":"2025-10-22T05:50:25.558Z","updated_at":"2025-10-22T05:50:26.643Z","avatar_url":"https://github.com/smwindecker.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: \"mixchar\"\noutput:\n  md_document:\n    variant: gfm\n---\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\"\n)\n```\n\n# \u003cimg src = \"man/figures/logo.png\" height=\"80\" width=\"350\" /\u003e\n\n[![CRAN](http://www.r-pkg.org/badges/version/mixchar)](https://cran.r-project.org/package=mixchar)\n[![Build Status](https://travis-ci.com/smwindecker/mixchar.svg?branch=master)](https://travis-ci.org/smwindecker/mixchar)\n[![codecov](https://codecov.io/gh/smwindecker/mixchar/branch/master/graph/badge.svg)](https://codecov.io/gh/smwindecker/mixchar)\n[![repo status](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)\n[![DOI](https://zenodo.org/badge/103010631.svg)](https://zenodo.org/badge/latestdoi/103010631)\n\nPlease cite [Windecker et al, 2021](https://openresearchsoftware.metajnl.com/articles/10.5334/jors.249)\n\n# Why deconvolution?\n\nPlant cell wall biomass is composed of a range of different types of carbon. Proportions of primary carbon types are useful for estimating kinetic decay parameters or for calculation of intrinsic plant traits. Traditional methods for calculation of these components involve wet chemistry methods that can be monetarily and environmentally costly. Thermogravimetric analysis is an alternative method, already in use in the biofuel field, that involves pyrolysing dry, ground plant litter and estimating components from resulting mass decay peaks. Since different carbon types break down relatively independently during different temperature phases, we can separate the multi-peaked rate of mass loss curve into constituent parts using a mixture model. This package conducts this peak separation analysis in a open-source and reproducible way using R. This methodology has been tested on a range of plant litter composed primarily of soluble carbohydrates, hemicellulose, cellulose, and lignin.\n\n# Installation\n\nYou can install `mixchar` by:\n\n```{r, eval = FALSE}\ninstall.packages(\"mixchar\")\n```\n\nor install the development version from [GitHub](https://github.com/) with:\n\n``` {r, eval = FALSE}\ninstall.packages(\"devtools\")\ndevtools::install_github(\"smwindecker/mixchar\")\n```\n\nBelow we will show a basic implementation of the package. For a detailed step by step workflow, see the [workflow vignette on the website](http://smwindecker.github.io/mixchar/articles/mixchar.html).\n\nFor a detailed discussion of the methodology, please see the [methodology vignette on the website](http://smwindecker.github.io/mixchar/articles/Background.html). \n\n# Basic use\n\nData from thermogravimetric analysis is usually exported in one of two forms: as mass loss or mass remaining (mg) by temperature. An example dataset that contains mass loss data for the species *Juncus amabilis* is included in the package:\n\n```{r}\nlibrary(mixchar)\nhead(juncus)\n```\n\nWe can use the function `process()` to take the derivative of this data, resulting in rate of mass loss over temperature data. To do so you need to specify the dataset, the initial mass of sample, the name of the temperature data column, and the name of your mass loss or mass data column. If you have mass loss data you can specify with `mass_loss` argument, if it's mass remaining data you can use the `mass` argument. You only need to provide one. The function defaults to temperature data in Celsius, but you can also indicate the data is provided in Kelvin, by adding `temp_units = 'K'`.\n\n```{r}\ntmp \u003c- process(juncus, \n               init_mass = 18.96, \n               temp = 'temp_C', \n               mass_loss = 'mass_loss')\n```\n\nThe default plot function for the derivative data shows you both the mass with temperature curve and the derivative rate of mass loss curve.\n\nProcessed data then needs to be deconvolved into its constituent parts. The deconvolve function takes care of this step, by cropping the derivative data to exclude dehydration and then running the Fraser-Suzuki mixture model and estimating individual peak parameters and weights.\n\n```{r}\noutput \u003c- deconvolve(tmp)\n```\n\nAlthough most biomass samples have only three main components (corresponding to hemicellulose, cellulose, and lignin), some have a second hemicellulose peak in the low temperature range. The function will decide whether three or four peaks are best, but you can override it by modifying the `n_peaks` argument. The function also has built in starting values for the nonlinear optimisation. If you'd like to modify those or the upper and lower bounds for the estimates, you can also do so with the `start_vec`, `lower_vec`, and `upper_vec` arguments to `deconvolve()`.\n\nThe `deconvolve()` function results in a variety of outputs. You can use a accessor functions to look at these. `component_weights()` will display the weights of each carbon component, `rate_data()` will show you the modified dataset used for fitting, `model_fit()` will show you the model fit, and `temp_bounds()` will print the temperature values at which the data were cropped for analysis. You can also plot the resulting output using the default plotting function, which can be in black and white or in colour.\n\n# Contribution\n\nThis is still a work in progress! If you see any mistakes, or find that the code is not functioning well on your data, let us know by logging a bug on the [issues page](http://www.github.com/smwindecker/mixchar/issues). \n\n# Acknowledgements\n\nThank you to Nick Tierney and David Wilkinson for valuable feedback during development. Thanks to the Holsworth Wildlife Reseach Endowment \u0026 The Ecological Society of Australia for support on this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmwindecker%2Fmixchar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmwindecker%2Fmixchar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmwindecker%2Fmixchar/lists"}