Skip to content

Commit 6e4fe0a

Browse files
committed
add support for ClouClip devices
1 parent 70b5703 commit 6e4fe0a

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Import support for the `ClouClip` device.
2+
3+
* `import_Dataset()` no longer changes a pre-existing `Id` column (if it is not called `Id`). The function is also more informative for the daylight savings time handling in files with more than one Id.
4+
15
# LightLogR 0.5.4
26

37
* `gg_photoperiod()` does no longer throw an error when the main plots `y.axis` is not based on a `MEDI` column.

R/import_LL.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,14 @@
234234
#'
235235
#' OcuWEAR data contains spectral data. Due to the format of the data file, the spectrum is not directly part of the tibble, but rather a list column of tibbles within the imported data, containing a `Wavelength` (nm) and `Intensity` (mW/m^2) column.
236236
#'
237+
#' ## ClouClip
238+
#'
239+
#' Manufacturer: Clouclip
240+
#'
241+
#' Implemented: April 2025
242+
#'
243+
#' ClouClip export files have the ending `.xls`, but are no real Microsoft Excel files, rather they are tab-separated text files. LightLogR thus does not read them in with an excel import routine
244+
#'
237245
#' @section Examples:
238246
#'
239247
#' ## Imports made easy

R/import_expressions.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,21 @@ import_expr <- list(
534534
dplyr::mutate(
535535
Datetime = lubridate::force_tz(Datetime, tz = tz)
536536
)
537+
}),
538+
#ClouClip
539+
ClouClip = rlang::expr({
540+
data <-
541+
readr::read_tsv(filename,
542+
show_col_types = FALSE,
543+
n_max = n_max,
544+
locale = locale,
545+
id = "file.name",
546+
name_repair = "universal",
547+
...
548+
)
549+
data <- data |>
550+
dplyr::rename(Datetime = Date) |>
551+
dplyr::mutate(Datetime = lubridate::force_tz(Datetime, tz = tz))
537552
})
538553
)
539554

0 commit comments

Comments
 (0)