Skip to content
Merged

Dev #89

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
4 changes: 3 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@
^cran-comments\.md$
^LightLogR-manual\.tex$
^CRAN-SUBMISSION$
^CODE_OF_CONDUCT\.md$
^CODE_OF_CONDUCT\.md$
^\.positai$
^\.claude$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ docs
inst/doc
# DS_Store file
.DS_Store
.positai
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
11 changes: 0 additions & 11 deletions R/gg_state.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,13 @@
#' 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 |>
#' dplyr::filter(Id == "Participant") |>
#' 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") |>
Expand Down
2 changes: 1 addition & 1 deletion R/import_expressions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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() %>%
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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'.
```

<img src="man/figures/README-unnamed-chunk-5-1.png" width="100%" />
Expand Down Expand Up @@ -451,8 +457,6 @@ At present, these are the devices we support in LightLogR:

- Actiwatch_Spectrum

- Actiwatch_Spectrum_de

- ActLumus

- ActTrust
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion man/LightLogR-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/figures/README-unnamed-chunk-19-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-20-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-4-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-6-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 0 additions & 11 deletions man/gg_states.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/import_Dataset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading