-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
75 lines (48 loc) · 2.5 KB
/
README.Rmd
File metadata and controls
75 lines (48 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
output: github_document
---
<!-- README.md is generated from README.html. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# excelDataGuide
<!-- badges: start -->
<!-- badges: end -->
**excelDataGuide** is an R package that streamlines reading data from standardized Excel spreadsheet templates into R.
## The problem
Spreadsheet templates are widely used in laboratories to standardize data recording and reduce errors. However, extracting data from these templates into R typically requires writing custom, template-specific code. This is tedious and error-prone.
## The solution
The **excelDataGuide** package eliminates this burden by:
1. **Defining a data guide** — a simple YAML file that describes where data are located in your template and how they should be interpreted
2. **Reading data with one command** — the `read_data()` function uses the guide to extract data correctly and automatically
The data guide approach also supports the [FAIR principles](https://www.go-fair.org/fair-principles/) by making your data structure explicit and machine-readable.
## Installation
You can install the development version of excelDataGuide from GitHub with:
``` r
# install.packages("pak")
pak::pak("SystemsBioinformatics/excelDataGuide")
```
## Quick start
Reading data from an Excel template requires just two files: the template itself and a data guide.
```{r example}
library(excelDataGuide)
# Path to your Excel file
datafile <- system.file("extdata", "example_data.xlsx", package = "excelDataGuide")
# Path to the data guide (YAML file)
guidefile <- system.file("extdata", "example_guide.yml", package = "excelDataGuide")
# Read the data
data <- read_data(datafile, guidefile)
```
The output is a list containing the data organized according to your guide.
## Next steps
For detailed guidance on using this package:
- **[Designing templates](articles/writing_templates.html)** — Best practices for structuring your Excel templates (version numbers, protected cells, parameter sheets, *etc.*).
- **[Writing data guides](articles/writing_data_guides.html)** — Step-by-step instructions for creating YAML guides, with examples of all four data types (keyvalue, cells, table, platedata) and a complete working example.
## Future work
- [Provide guide and template structures for unbounded data types (time series, *etc.*)](https://github.com/SystemsBioinformatics/excelDataGuide/issues/1)
```