| Title: | Explicitly Paired Fabric Specimen Measurement Tables |
|---|---|
| Description: | Validates long-format paired specimen measurements, normalizes millimetres, centimetres and inches, and compares before and after values within an explicitly identified cohort, specimen, wash cycle and axis. Preserves original values and units and reports incomplete pairs without estimating missing observations. Provides descriptive cohort tables and spreadsheet-conscious CSV export. Example data are entirely synthetic and are not empirical research or fabric performance claims. |
| Authors: | Sewlore [aut, cre, cph] |
| Maintainer: | Sewlore <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-10-17 22:31:47 UTC |
| Source: | https://github.com/gokimedia/sewlore-sewing-tools |
Local validation, physical-unit normalization, pairing and descriptive tabulation of before/after measurements. Original values and units remain visible. No telemetry or network calls occur in the analysis functions. All bundled example data are synthetic.
Validate long-format measurements, retain original units, and compare paired measurements within explicitly identified cohorts, specimens, wash cycles and axes. Included examples are entirely synthetic, not empirical observations.
read_specimen_csv(file) validate_specimen_measurements(data) pair_specimen_measurements(data, incomplete = c("error", "report")) summarise_specimen_pairs(pairs) write_specimen_pairs(pairs, file, spreadsheet_safe = TRUE) synthetic_specimens()read_specimen_csv(file) validate_specimen_measurements(data) pair_specimen_measurements(data, incomplete = c("error", "report")) summarise_specimen_pairs(pairs) write_specimen_pairs(pairs, file, spreadsheet_safe = TRUE) synthetic_specimens()
file |
For import, an existing local UTF-8 CSV file. For export, a local output path; an existing file is overwritten. |
data |
Nonempty data frame with unique column names and required columns |
incomplete |
Default |
pairs |
The nonempty result of |
spreadsheet_safe |
If true, exported character cells beginning with a possible formula marker receive an apostrophe prefix. Numeric columns retain numeric signs. This changes affected exported labels, not the input object, and is a conservative precaution rather than a guarantee for every spreadsheet application. |
Comparison keys are cohort, specimen identifier, wash cycle and axis. A duplicate stage within a key is an error, including duplicate equal observations. Labels are trimmed; stage, unit and axis are lowercased. Cohort and specimen identifier remain case-sensitive. If cohort is omitted, the explicit output label is unspecified; callers must establish that observations are comparable before grouping them.
Every before/after pair must represent the intended baseline for that cycle. For cumulative change from an original baseline, supply that original measurement as each cycle's before value. The package never substitutes the first or previous cycle automatically.
One inch is 25.4 millimetres. Delta is after minus before in millimetres. Change percent is 100 times delta divided by before. Shrinkage percent is the negative of change percent: contraction is positive and expansion is negative. R uses floating-point arithmetic, so comparisons and rounding should account for numeric precision.
Summary means are unweighted means of per-specimen percentage changes. The standard deviation is descriptive spread across complete pairs, not measurement uncertainty or a confidence interval. It is missing for a single complete pair. No inference about fabric composition, care instructions or population performance is made.
Import and validation return a normalized long data frame with value_mm, preserving additional input columns. Pairing returns a sewlore_pairs data frame with status, before/after input values and units, normalized values, delta, change and shrinkage percentages. Summary returns one row per cohort/cycle/axis including complete and missing counts and descriptive means, median and standard deviation. Export invisibly returns the normalized output path. synthetic_specimens returns the explicitly synthetic bundled example measurements.
https://sewlore.com/pages/fabric-measurement-methods-guide
data <- synthetic_specimens() # Synthetic demonstrations, not laboratory data. pairs <- pair_specimen_measurements(data) summarise_specimen_pairs(pairs) path <- tempfile(fileext = ".csv") write_specimen_pairs(pairs, path) unlink(path)data <- synthetic_specimens() # Synthetic demonstrations, not laboratory data. pairs <- pair_specimen_measurements(data) summarise_specimen_pairs(pairs) path <- tempfile(fileext = ".csv") write_specimen_pairs(pairs, path) unlink(path)