Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added tests and small aspects to articles #25

Merged
merged 5 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
^app\.R$
^vignettes/articles$
^\.gitlab-ci\.yml$
^cran-comments\.md$
^LightLogR-manual\.tex$
15 changes: 4 additions & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: LightLogR
Title: Work With Data from Wearable Light Loggers and Optical Radiation Dosimeters
Version: 0.3.7
Title: Process Data from Wearable Light Loggers and Optical Radiation Dosimeters
Version: 0.3.8
Authors@R: c(
person("Johannes", "Zauner",
email = "[email protected]", role = c("aut", "cre"),
Expand All @@ -15,17 +15,11 @@ Authors@R: c(
person("EURAMET", role = "fnd", comment = "European Association of National Metrology Institutes. Website: www.euramet.org. Grant Number: 22NRM05 MeLiDos. Grant Statement: The project (22NRM05 MeLiDos) has received funding from the European Partnership on Metrology, co-financed from the European Union’s Horizon Europe Research and Innovation Programme and by the Participating States."),
person("European Union", role = "fnd", comment = "Co-funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or EURAMET. Neither the European Union nor the granting authority can be held responsible for them."),
person("TSCN-Lab", comment = c(URL = "www.tscnlab.org"), role = "cph"))
Description: LightLogR is a package under development as part of the MeLiDos
project aimed at developing a standard workflow for wearable light logger
data and optical radiation dosimeters. MeLiDos is a joint, EURAMET-funded
project involving sixteen partners across Europe. Its primary contributions
towards fostering FAIR data include the development of a common file format,
robust metadata descriptors, and an accompanying open-source software
ecosystem.
Description: Import, processing, validation, and visualization of personal light exposure measurement data from wearable devices. The package implements features such as the import of data and metadata files, conversion of common file formats, validation of light logging data, verification of crucial metadata, calculation of common parameters, and semi-automated analysis and visualization.
License: GPL (>= 3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
URL: https://github.com/tscnlab/LightLogR,
https://tscnlab.github.io/LightLogR/,
https://zenodo.org/doi/10.5281/zenodo.11562600
Expand Down Expand Up @@ -67,4 +61,3 @@ Suggests:
testthat (>= 3.0.0),
tidyverse
Config/testthat/edition: 3
VignetteBuilder: knitr
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# LightLogR 0.3.8

* Submission to CRAN

# LightLogR 0.3.7 "Astronomical dawn"

* Changes to the tutorial articles on the website
Expand Down
38 changes: 33 additions & 5 deletions R/import_LL.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,28 +66,56 @@
#' ```
#'
#' ## ActLumus
#' Manufacturer: Condor Instruments
#' Model: ActLumus
#' Implemented: 2023
#' A sample file is provided with the package, it can be accessed through
#' `system.file("extdata/205_actlumus_Log_1020_20230904101707532.txt.zip",
#' package = "LightLogR")`. It does not need to be unzipped to be imported.
#' This sample file is a good example for a regular dataset without gaps
#' ## LYS
#' ## LYS
#' Manufacturer: LYS Technologies
#' Model: LYS Button
#' Implemented: 2023
#' A sample file is provided with the package, it can be accessed
#' through `system.file("extdata/sample_data_LYS.csv", package =
#' "LightLogR")`. This sample file is a good example for an irregular dataset.
#' ## Actiwatch_Spectrum
#' Manufacturer: Philips Respironics
#' Model: Actiwatch Spectrum
#' Implemented: 2023
#' **Required Argument: `column_names`** A character vector containing column
#' names in the order in which they appear in the file. This is necessary to
#' find the starting point of actual data.
#' ## ActTrust
#' Manufacturer: Condor Instruments
#' Model: ActTrust1, ActTrust2
#' Implemented: 2024
#' This function works for both ActTrust 1 and 2 devices
#' ## Speccy
#' .
#' Manufacturer: Monash University
#' Model: Speccy
#' Implemented: 2024
#' ## DeLux
#' .
#' Manufacturer: Intelligent Automation Inc
#' Model: DeLux
#' Implemented: 2023
#' ## LiDo
#' .
#' Manufacturer: University of Lucerne
#' Model: LiDo
#' Implemented: 2023
#' ## SpectraWear
#' .
#' Manufacturer:
#' Model: SpectraWear
#' Implemented: 2024
#' ## NanoLambda
#' Manufacturer: NanoLambda
#' Model: XL-500 BLE
#' Implemented: 2024
#' ## LightWatcher
#' Manufacturer: Object-Tracker
#' Model: LightWatcher
#' Implemented: 2024
#'
#' @section Examples:
#'
Expand Down
4 changes: 2 additions & 2 deletions R/metric_EMA.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
#' @references
#' Price, L. L. A. (2014). On the Role of Exponential Smoothing in Circadian
#' Dosimetry. \emph{Photochemistry and Photobiology}, 90(5), 1184-1192.
#' \url{https://doi.org/10.1111/php.12282}
#' \doi{10.1111/php.12282}
#'
#' Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies:
#' Quantification metrics. \emph{Lighting Research & Technology}.
#' \url{https://doi.org/10.1177/14771535231170500}
#' \doi{10.1177/14771535231170500}
#'
#' @examples
#' sample.data.environment.EMA = sample.data.environment %>%
Expand Down
4 changes: 2 additions & 2 deletions R/metric_barroso.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
#' @references
#' Barroso, A., Simons, K., & Jager, P. de. (2014). Metrics of circadian
#' lighting for clinical investigations. \emph{Lighting Research & Technology},
#' 46(6), 637–649. \url{https://doi.org/10.1177/1477153513502664}
#' 46(6), 637–649. \doi{10.1177/1477153513502664}
#'
#' Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies:
#' Quantification metrics. \emph{Lighting Research & Technology}.
#' \url{https://doi.org/10.1177/14771535231170500}
#' \doi{10.1177/14771535231170500}
#'
#' @examples
#'
Expand Down
2 changes: 1 addition & 1 deletion R/metric_bright_dark_period.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#' @references
#' Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies:
#' Quantification metrics. \emph{Lighting Research & Technology}.
#' \url{https://doi.org/10.1177/14771535231170500}
#' \doi{10.1177/14771535231170500}
#'
#' @export
#'
Expand Down
4 changes: 2 additions & 2 deletions R/metric_centroidLE.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
#' L. K., Picard, R. W., Lockley, S. W., Klerman, E. B., & Czeisler, C. A. (2017).
#' Irregular sleep/wake patterns are associated with poorer academic performance
#' and delayed circadian and sleep/wake timing. \emph{Scientific Reports},
#' 7(1), 3216. \url{https://doi.org/10.1038/s41598-017-03171-4}
#' 7(1), 3216. \doi{10.1038/s41598-017-03171-4}
#'
#' Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies:
#' Quantification metrics. \emph{Lighting Research & Technology}.
#' \url{https://doi.org/10.1177/14771535231170500}
#' \doi{10.1177/14771535231170500}
#'
#' @examples
#' # Dataset with POSIXct time vector
Expand Down
4 changes: 2 additions & 2 deletions R/metric_disparity_index.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#' Martín-Vide, J., & Peñuelas, J. (2018).
#' The consecutive disparity index, D: A measure of temporal variability in
#' ecological studies. \emph{Ecosphere}, 9(12), e02527.
#' \url{https://doi.org/10.1002/ecs2.2527}
#' \doi{10.1002/ecs2.2527}
#'
#' Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies:
#' Quantification metrics. \emph{Lighting Research & Technology}.
#' \url{https://doi.org/10.1177/14771535231170500}
#' \doi{10.1177/14771535231170500}
#'
#' @examples
#' dataset1 <-
Expand Down
2 changes: 1 addition & 1 deletion R/metric_duration_above_threshold.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#' @references
#' Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies:
#' Quantification metrics. \emph{Lighting Research & Technology}.
#' \url{https://doi.org/10.1177/14771535231170500}
#' \doi{10.1177/14771535231170500}
#'
#' @export
#'
Expand Down
4 changes: 2 additions & 2 deletions R/metric_frequency_crossing_threshold.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#' @references
#' Alvarez, A. A., & Wildsoet, C. F. (2013). Quantifying light
#' exposure patterns in young adult students. \emph{Journal of Modern Optics},
#' 60(14), 1200–1208. \url{https://doi.org/10.1080/09500340.2013.845700}
#' 60(14), 1200–1208. \doi{10.1080/09500340.2013.845700}
#'
#' Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies:
#' Quantification metrics. \emph{Lighting Research & Technology}.
#' \url{https://doi.org/10.1177/14771535231170500}
#' \doi{10.1177/14771535231170500}
#'
#' @examples
#
Expand Down
4 changes: 2 additions & 2 deletions R/metric_interdaily_stability.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
#' McCall, W. V., & Rosenquist, P. B. (1999). Bright Light Therapy: Improved
#' Sensitivity to Its Effects on Rest-Activity Rhythms in Alzheimer Patients
#' by Application of Nonparametric Methods. \emph{Chronobiology International},
#' 16(4), 505–518. \url{https://doi.org/10.3109/07420529908998724}
#' 16(4), 505–518. \doi{10.3109/07420529908998724}
#'
#' Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies:
#' Quantification metrics. \emph{Lighting Research & Technology}.
#' \url{https://doi.org/10.1177/14771535231170500}
#' \doi{10.1177/14771535231170500}
#'
#' @examples
#'
Expand Down
4 changes: 2 additions & 2 deletions R/metric_intradaily_variability.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#' McCall, W. V., & Rosenquist, P. B. (1999). Bright Light Therapy: Improved
#' Sensitivity to Its Effects on Rest-Activity Rhythms in Alzheimer Patients
#' by Application of Nonparametric Methods. \emph{Chronobiology International},
#' 16(4), 505–518. \url{https://doi.org/10.3109/07420529908998724}
#' 16(4), 505–518. \doi{10.3109/07420529908998724}
#'
#' Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies:
#' Quantification metrics. \emph{Lighting Research & Technology}.
#' \url{https://doi.org/10.1177/14771535231170500}
#' \doi{10.1177/14771535231170500}
#'
#' @examples
#'
Expand Down
4 changes: 2 additions & 2 deletions R/metric_midpointCE.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#' Shochat, T., Santhi, N., Herer, P., Flavell, S. A., Skeldon, A. C.,
#' & Dijk, D.-J. (2019). Sleep Timing in Late Autumn and Late Spring Associates
#' With Light Exposure Rather Than Sun Time in College Students.
#' \emph{Frontiers in Neuroscience}, 13. \url{https://doi.org/10.3389/fnins.2019.00882}
#' \emph{Frontiers in Neuroscience}, 13. \doi{10.3389/fnins.2019.00882}
#'
#' Hartmeyer, S.L., Andersen, M. (2023). Towards a framework for light-dosimetry studies:
#' Quantification metrics. \emph{Lighting Research & Technology}.
#' \url{https://doi.org/10.1177/14771535231170500}
#' \doi{10.1177/14771535231170500}
#'
#' @examples
# Dataset with POSIXct time vector
Expand Down
Loading
Loading