diff --git a/.Rbuildignore b/.Rbuildignore index f3d0631..7a0882a 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -18,4 +18,6 @@ ^cran-comments\.md$ ^LightLogR-manual\.tex$ ^CRAN-SUBMISSION$ -^CODE_OF_CONDUCT\.md$ \ No newline at end of file +^CODE_OF_CONDUCT\.md$ +^\.positai$ +^\.claude$ diff --git a/.gitignore b/.gitignore index 42f07ba..ccca820 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ docs inst/doc # DS_Store file .DS_Store +.positai diff --git a/DESCRIPTION b/DESCRIPTION index 57a5e0d..b22c407 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: LightLogR Title: Process Data from Wearable Light Loggers and Optical Radiation Dosimeters -Version: 0.10.2 +Version: 0.10.3 Authors@R: c( person("Johannes", "Zauner", email = "johannes.zauner@tum.de", role = c("aut", "cre"), @@ -12,7 +12,7 @@ Authors@R: c( email = "steffen.hartmeyer@epfl.ch", role = "aut", comment = c(ORCID = "0000-0002-2813-2668")), person("European Partnership on Metrology", role = "fnd", comment = "The project (22NRM05 MeLiDos) has received funding from the European Partnership on Metrology, co-financed by the European Union's Horizon Europe Research and Innovation Programme, EURAMET, and the Participating States. Views and opinions expressed are those of the authors and do not necessarily reflect those of the European Union or EURAMET."), - person("Wellcome Trust", role = "fnd", comment = "LightLogR's development is supported by the Wellcome Trust (www.wellcome.org), 226787/2/22/Z."), + person("Wellcome Trust", role = "fnd", comment = c("LightLogR's development is supported by the Wellcome Trust (wellcome.org), 226787/2/22/Z.")), person("Reality Labs Research", role = "fnd", comment = "LightLogR's development is supported by the GLEE project (Global Light Exposure Engine, www.visualdiet.org) funded by Reality Labs Research."), person("Translational Sensory and Circadian Neuroscience Unit (MPS/TUM/TUMCREATE)", comment = c(URL = "www.tscnlab.org"), role = "cph")) 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. diff --git a/NEWS.md b/NEWS.md index de58f8d..b1159d7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# LightLogR 0.10.3 + +* `LYS` import now works with any timestamp column in raw data, as long as it starts with `timestamp` + # LightLogR 0.10.2 * `add_states()` no longer creates duplicate observations at identical start/endpoints. The default behavior is now that the `start` is inclusive and `end` is exclusive. Adjust the new `bounds` argument for more options. diff --git a/R/gg_state.R b/R/gg_state.R index ff2d406..806f2b6 100644 --- a/R/gg_state.R +++ b/R/gg_state.R @@ -69,11 +69,6 @@ #' ggplot2::scale_fill_manual(values=c("#868686FF", "#EFC000FF", "#0073C2FF")) #' #this line is simply for sensible colors #' -#' #same, but with gg_day() -#' state_data |> -#' dplyr::filter(Id == "Participant") |> -#' gg_day(geom = "line") |> -#' gg_states(state, fill = "red") #' #' #more complex state #' state_data |> @@ -81,12 +76,6 @@ #' gg_day(geom = "line") |> #' gg_states(state2, aes_fill = state2) #' -#' #with gg_doubleplot -#' state_data |> -#' dplyr::filter(Id == "Participant") |> -#' gg_doubleplot() |> -#' gg_states(state2, aes_fill = state2) -#' #' #setting the height of the bars #' state_data |> #' dplyr::filter(Id == "Participant") |> diff --git a/R/import_expressions.R b/R/import_expressions.R index a424749..2e458eb 100644 --- a/R/import_expressions.R +++ b/R/import_expressions.R @@ -181,7 +181,7 @@ import_expr <- list( ... )) data <- data %>% - dplyr::rename(Datetime = timestamp, + dplyr::rename(Datetime = starts_with("timestamp"), MEDI = mEDI) %>% dplyr::mutate(Datetime = Datetime %>% lubridate::dmy_hms() %>% diff --git a/README.md b/README.md index 1393c44..1b75630 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,9 @@ library(LightLogR) #the following packages are needed for the examples as shown below. library(flextable) library(dplyr) +#> Warning: package 'dplyr' was built under R version 4.5.2 library(ggplot2) +#> Warning: package 'ggplot2' was built under R version 4.5.2 ``` ### Import @@ -109,10 +111,10 @@ filename <- system.file("extdata/205_actlumus_Log_1020_20230904101707532.txt.zip", package = "LightLogR") dataset <- import$ActLumus(filename, "Europe/Berlin", manual.id = "P1") -#> Multiple files in zip: reading '205_actlumus_Log_1020_20230904101707532.txt' #> #> Successfully read in 61'016 observations across 1 Ids from 1 ActLumus-file(s). #> Timezone set is Europe/Berlin. +#> The system timezone is Europe/Madrid. Please correct if necessary! #> #> First Observation: 2023-08-28 08:47:54 #> Last Observation: 2023-09-04 10:17:04 @@ -180,6 +182,10 @@ dataset |> geom_line(col = "red", linewidth = 0.25) + labs(title = "Personal light exposure across a week", subtitle = "Boxplot in 3-hour bins") +#> Warning: Orientation is not uniquely specified when both the x and y aesthetics are +#> continuous. Picking default orientation 'x'. +#> Orientation is not uniquely specified when both the x and y aesthetics are +#> continuous. Picking default orientation 'x'. ``` @@ -451,8 +457,6 @@ At present, these are the devices we support in LightLogR: - Actiwatch_Spectrum -- Actiwatch_Spectrum_de - - ActLumus - ActTrust @@ -540,14 +544,11 @@ repository](https://github.com/tscnlab/LightLogR/issues). ## About the creation and funding of LightLogR **LightLogR** is developed by the [*Translational Sensory & Circadian -Neuroscience*](https://www.tscnlab.org) lab, a joint group from the -[Technical University of Munich](https://www.tum.de/en/) and the [Max -Planck Institute for Biological Neuroscience Unit -(MPS/TUM/TUMCREATE)\*](https://www.tscnlab.org), a joint group based at -the [Technical University of Munich](https://www.tum.de/en/), -[TUMCREATE](https://www.tum-create.edu.sg/), the [Max Planck Institute -for Biological -Cybernetics](https://www.mpg.de/152075/biological-cybernetics). +Neuroscience Unit (MPS/TUM/TUMCREATE*](https://www.tscnlab.org), a joint +group based at the [Max Planck Institute for Biological +Cybernetics](https://www.mpg.de/152075/biological-cybernetics), the +[Technical University of Munich](https://www.tum.de/en/), and +[TUMCREATE](https://www.tum-create.edu.sg/), . [*MeLiDos*](https://www.melidos.eu) is a joint, [EURAMET](https://www.euramet.org)-funded project involving sixteen diff --git a/cran-comments.md b/cran-comments.md index 8d60541..d19a8bf 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1,9 @@ +## Submission Version 0.10.3 + +### R CMD check results + +0 errors ✔ | 0 warnings ✔ | 0 notes ✔ + ## Submission Version 0.10.0 ### R CMD check results diff --git a/man/LightLogR-package.Rd b/man/LightLogR-package.Rd index 44d6127..61f6a37 100644 --- a/man/LightLogR-package.Rd +++ b/man/LightLogR-package.Rd @@ -32,7 +32,7 @@ Authors: Other contributors: \itemize{ \item European Partnership on Metrology (The project (22NRM05 MeLiDos) has received funding from the European Partnership on Metrology, co-financed by the European Union's Horizon Europe Research and Innovation Programme, EURAMET, and the Participating States. Views and opinions expressed are those of the authors and do not necessarily reflect those of the European Union or EURAMET.) [funder] - \item Wellcome Trust (LightLogR's development is supported by the Wellcome Trust (www.wellcome.org), 226787/2/22/Z.) [funder] + \item Wellcome Trust (LightLogR's development is supported by the Wellcome Trust (wellcome.org), 226787/2/22/Z.) [funder] \item Reality Labs Research (LightLogR's development is supported by the GLEE project (Global Light Exposure Engine, www.visualdiet.org) funded by Reality Labs Research.) [funder] \item Translational Sensory and Circadian Neuroscience Unit (MPS/TUM/TUMCREATE) (www.tscnlab.org) [copyright holder] } diff --git a/man/figures/README-unnamed-chunk-19-1.png b/man/figures/README-unnamed-chunk-19-1.png index 6871bf6..4486309 100644 Binary files a/man/figures/README-unnamed-chunk-19-1.png and b/man/figures/README-unnamed-chunk-19-1.png differ diff --git a/man/figures/README-unnamed-chunk-20-1.png b/man/figures/README-unnamed-chunk-20-1.png index 04157e8..c1b1195 100644 Binary files a/man/figures/README-unnamed-chunk-20-1.png and b/man/figures/README-unnamed-chunk-20-1.png differ diff --git a/man/figures/README-unnamed-chunk-4-1.png b/man/figures/README-unnamed-chunk-4-1.png index d0f30a6..086c36f 100644 Binary files a/man/figures/README-unnamed-chunk-4-1.png and b/man/figures/README-unnamed-chunk-4-1.png differ diff --git a/man/figures/README-unnamed-chunk-5-1.png b/man/figures/README-unnamed-chunk-5-1.png index b3170e9..2422014 100644 Binary files a/man/figures/README-unnamed-chunk-5-1.png and b/man/figures/README-unnamed-chunk-5-1.png differ diff --git a/man/figures/README-unnamed-chunk-6-1.png b/man/figures/README-unnamed-chunk-6-1.png index 95ccaf1..8a40c07 100644 Binary files a/man/figures/README-unnamed-chunk-6-1.png and b/man/figures/README-unnamed-chunk-6-1.png differ diff --git a/man/figures/README-unnamed-chunk-7-1.png b/man/figures/README-unnamed-chunk-7-1.png index 06c06ab..7ffb720 100644 Binary files a/man/figures/README-unnamed-chunk-7-1.png and b/man/figures/README-unnamed-chunk-7-1.png differ diff --git a/man/figures/README-unnamed-chunk-8-1.png b/man/figures/README-unnamed-chunk-8-1.png index c5c9f15..307152f 100644 Binary files a/man/figures/README-unnamed-chunk-8-1.png and b/man/figures/README-unnamed-chunk-8-1.png differ diff --git a/man/gg_states.Rd b/man/gg_states.Rd index a72ebd8..2b193d1 100644 --- a/man/gg_states.Rd +++ b/man/gg_states.Rd @@ -99,11 +99,6 @@ state_data |> ggplot2::scale_fill_manual(values=c("#868686FF", "#EFC000FF", "#0073C2FF")) #this line is simply for sensible colors -#same, but with gg_day() -state_data |> - dplyr::filter(Id == "Participant") |> - gg_day(geom = "line") |> - gg_states(state, fill = "red") #more complex state state_data |> @@ -111,12 +106,6 @@ state_data |> gg_day(geom = "line") |> gg_states(state2, aes_fill = state2) - #with gg_doubleplot - state_data |> - dplyr::filter(Id == "Participant") |> - gg_doubleplot() |> - gg_states(state2, aes_fill = state2) - #setting the height of the bars state_data |> dplyr::filter(Id == "Participant") |> diff --git a/man/import_Dataset.Rd b/man/import_Dataset.Rd index d320f1a..efafbd8 100644 --- a/man/import_Dataset.Rd +++ b/man/import_Dataset.Rd @@ -324,7 +324,7 @@ dataset <- import_Dataset("ActLumus", filepath, auto.plot = FALSE) #> #> Successfully read in 61'016 observations across 1 Ids from 1 ActLumus-file(s). #> Timezone set is UTC. -#> The system timezone is Europe/Berlin. Please correct if necessary! +#> The system timezone is Europe/Madrid. Please correct if necessary! #> #> First Observation: 2023-08-28 08:47:54 #> Last Observation: 2023-09-04 10:17:04 @@ -341,7 +341,7 @@ Import functions can also be called directly: #> #> Successfully read in 61'016 observations across 1 Ids from 1 ActLumus-file(s). #> Timezone set is UTC. -#> The system timezone is Europe/Berlin. Please correct if necessary! +#> The system timezone is Europe/Madrid. Please correct if necessary! #> #> First Observation: 2023-08-28 08:47:54 #> Last Observation: 2023-09-04 10:17:04