Last updated: 2025-12-17
Checks: 7 0
Knit directory: SkinOptics/
This reproducible R Markdown analysis was created with workflowr (version 1.7.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20251211) was run prior to running
the code in the R Markdown file. Setting a seed ensures that any results
that rely on randomness, e.g. subsampling or permutations, are
reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version a6f7dc4. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for
the analysis have been committed to Git prior to generating the results
(you can use wflow_publish or
wflow_git_commit). workflowr only checks the R Markdown
file, but you know if there are other scripts or data files that it
depends on. Below is the status of the Git repository when the results
were generated:
Ignored files:
Ignored: .RData
Ignored: .Rhistory
Ignored: .Rproj.user/
Untracked files:
Untracked: output/palm_ei_face_mi_correlation.pdf
Untracked: output/palm_ei_face_mi_sd_correlation.pdf
Untracked: output/reflectance_face.pdf
Untracked: output/reflectance_palm.pdf
Untracked: output/reflectance_palm_face.pdf
Unstaged changes:
Modified: output/absorbance_derivative_face.pdf
Modified: output/absorbance_derivative_palm.pdf
Modified: output/absorbance_derivative_palm_face.pdf
Modified: output/absorbance_mi_sd.pdf
Modified: output/ei_mi_correlation.pdf
Modified: output/ei_sd_mi_correlation.pdf
Modified: output/heatmap.pdf
Modified: output/mi_distribution.pdf
Modified: output/reflectance_derivative_face.pdf
Modified: output/reflectance_derivative_palm.pdf
Modified: output/reflectance_derivative_palm_face.pdf
Modified: output/reflectance_mi_sd.pdf
Modified: output/reflectance_mi_sd_regression.pdf
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were
made to the R Markdown (analysis/JID_SkinOptics.Rmd) and
HTML (docs/JID_SkinOptics.html) files. If you’ve configured
a remote Git repository (see ?wflow_git_remote), click on
the hyperlinks in the table below to view the files as they were in that
past version.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| Rmd | a6f7dc4 | Junhui He | 2025-12-17 | update JID_SkinOptics.Rmd |
| html | 32c3e8f | Junhui He | 2025-12-11 | Rebuild site to apply navbar layout |
| html | b2cbe44 | Junhui He | 2025-12-11 | Build site. |
| Rmd | df71367 | Junhui He | 2025-12-11 | modify face site |
| html | d98f12d | Junhui He | 2025-12-11 | Build site. |
| Rmd | 2fc3d03 | Junhui He | 2025-12-11 | add correlation analysis |
| html | 81580b5 | Junhui He | 2025-12-11 | build workflowr |
| Rmd | e11deee | Junhui He | 2025-12-11 | calculate EI |
| html | e11deee | Junhui He | 2025-12-11 | calculate EI |
| Rmd | 53d4f9c | Junhui He | 2025-12-11 | create SkinOptics |
| html | 53d4f9c | Junhui He | 2025-12-11 | create SkinOptics |
Melanin index (MI) is calculated based on skin reflectance at 680 nm. Specifically, MI = -100 * log10(R680 / 100), where R680 is the reflectance percentage at 680 nm.
Erythema index (EI) is calculated as EI = 100 * log10(R680 / ((R550 + R560)/2)), where R550 and R560 are the reflectance percentages at 550 nm and 560 nm, respectively.
EI variability is measured by the standard deviation of EIs within a sliding window of MI values. The window size is set to 20 MI units, and the step size is 1 MI unit.
FACE site refers to Forehead or Cheek, while PALM site refers to the Palm of the hand.
Representative FACE MI:
First derivatives of skin spectra are estimated using local polynomial regression with bandwidth selected by the dpill function, scaled by a factor of 0.7.
Eumelanin classes are defined based on melanin index ranges as follows:
The pdf files generated in this analysis are saved in the “output” directory.

quartz_off_screen
2

| Version | Author | Date |
|---|---|---|
| 53d4f9c | Junhui He | 2025-12-11 |
quartz_off_screen
2
| Eumelanin class | Number of subjects |
|---|---|
| Low | 77 |
| Intermediate low | 1800 |
| Intermediate | 191 |
| Intermediate high | 30 |
| High | 3 |
| Eumelanin class | Number of subjects |
|---|---|
| Low | 127 |
| Intermediate low | 621 |
| Intermediate | 27 |
| Intermediate high | 1 |

quartz_off_screen
2

quartz_off_screen
2

quartz_off_screen
2

quartz_off_screen
2

quartz_off_screen
2

| Version | Author | Date |
|---|---|---|
| b2cbe44 | Junhui He | 2025-12-11 |
quartz_off_screen
2

quartz_off_screen
2

quartz_off_screen
2

| Version | Author | Date |
|---|---|---|
| b2cbe44 | Junhui He | 2025-12-11 |
quartz_off_screen
2

quartz_off_screen
2
Call:
lm(formula = sd_ref ~ log_mi + I(log_mi^2), data = sd_face)
Residuals:
Min 1Q Median 3Q Max
-0.069041 -0.014131 -0.001693 0.011082 0.100521
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.560287 0.066388 23.50 <2e-16 ***
log_mi -0.682188 0.035856 -19.03 <2e-16 ***
I(log_mi^2) 0.076287 0.004825 15.81 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.02265 on 2098 degrees of freedom
Multiple R-squared: 0.6498, Adjusted R-squared: 0.6495
F-statistic: 1947 on 2 and 2098 DF, p-value: < 2.2e-16
Call:
lm(formula = sd_ref ~ log_mi, data = sd_palm)
Residuals:
Min 1Q Median 3Q Max
-0.066053 -0.016370 0.000337 0.015371 0.071971
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.560165 0.013160 42.56 <2e-16 ***
log_mi -0.120567 0.003789 -31.82 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.0238 on 774 degrees of freedom
Multiple R-squared: 0.5668, Adjusted R-squared: 0.5662
F-statistic: 1013 on 1 and 774 DF, p-value: < 2.2e-16

quartz_off_screen
2

quartz_off_screen
2

quartz_off_screen
2

quartz_off_screen
2

quartz_off_screen
2

quartz_off_screen
2
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS 15.6.1
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Detroit
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] KernSmooth_2.23-26 openxlsx_4.2.8.1 scales_1.4.0 lubridate_1.9.4
[5] forcats_1.0.1 stringr_1.6.0 dplyr_1.1.4 purrr_1.2.0
[9] readr_2.1.6 tidyr_1.3.1 tibble_3.3.0 ggplot2_4.0.1
[13] tidyverse_2.0.0 patchwork_1.3.2 knitr_1.50
loaded via a namespace (and not attached):
[1] sass_0.4.10 generics_0.1.4 lattice_0.22-7 stringi_1.8.7
[5] hms_1.1.4 digest_0.6.39 magrittr_2.0.4 timechange_0.3.0
[9] evaluate_1.0.5 grid_4.3.1 RColorBrewer_1.1-3 fastmap_1.2.0
[13] Matrix_1.5-4.1 rprojroot_2.1.1 workflowr_1.7.2 jsonlite_2.0.0
[17] zip_2.3.3 whisker_0.4.1 promises_1.5.0 mgcv_1.8-42
[21] viridisLite_0.4.2 jquerylib_0.1.4 cli_3.6.5 rlang_1.1.6
[25] splines_4.3.1 withr_3.0.2 cachem_1.1.0 yaml_2.3.11
[29] otel_0.2.0 tools_4.3.1 tzdb_0.5.0 httpuv_1.6.16
[33] vctrs_0.6.5 R6_2.6.1 lifecycle_1.0.4 git2r_0.36.2
[37] fs_1.6.6 pkgconfig_2.0.3 pillar_1.11.1 bslib_0.9.0
[41] later_1.4.4 gtable_0.3.6 glue_1.8.0 Rcpp_1.1.0
[45] xfun_0.54 tidyselect_1.2.1 farver_2.1.2 nlme_3.1-168
[49] htmltools_0.5.9 labeling_0.4.3 rmarkdown_2.30 compiler_4.3.1
[53] S7_0.2.1