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

Dev #28

Merged
merged 17 commits into from
Jul 23, 2024
Merged

Dev #28

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
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
^vignettes/articles$
^\.gitlab-ci\.yml$
^cran-comments\.md$
^LightLogR-manual\.tex$
^LightLogR-manual\.tex$
^CRAN-SUBMISSION$
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.3.8
Date: 2024-07-04 09:38:13 UTC
SHA: 8714a0b64b88a425313e7a6c19913fb3878cf1d0
2 changes: 1 addition & 1 deletion 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.3.8
Version: 0.4.0
Authors@R: c(
person("Johannes", "Zauner",
email = "[email protected]", role = c("aut", "cre"),
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export(interdaily_stability)
export(interval2state)
export(intradaily_variability)
export(join_datasets)
export(ll_import_expr)
export(midpointCE)
export(nvRC)
export(nvRC_circadianBias)
Expand All @@ -52,6 +53,7 @@ export(period_above_threshold)
export(pulses_above_threshold)
export(sc2interval)
export(sleep_int2Brown)
export(supported_devices)
export(symlog_trans)
export(threshold_for_duration)
export(timing_above_threshold)
Expand Down
18 changes: 18 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# LightLogR 0.4.0 "Nautical dawn"

* release on CRAN!

* changed the `supported.devices` list to a function `supported_devices()` instead, so the documentation automatically updates with the list of supported devices. Similarly, `ll_import_expr` is now `ll_import_expr()`.

* added support for the Meta `VEET` device for visual experience measurements

* added support for the `Kronowise` device

* added support for the MPI `melanopiQ Circadian Eye` (Prototype)

* rewrote the import function for `Actiwatch_Spectrum`, as the sample file the original was based off, had specific formatting to German standards. Now, the German version can still be called through `Actiwatch_Spectrum_de`, wheras the main function refers to the english/international format.

* updated the landing page for the website with a list of supported devices and a table of metrics

* small changes to documentation

# LightLogR 0.3.8

* Submission to CRAN
Expand Down
1 change: 0 additions & 1 deletion R/aaa.r
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ empty_function <- function() {
}

.onLoad <- function(libname, pkgname) {
utils::globalVariables("supported.devices")
utils::globalVariables(".")
}

2 changes: 1 addition & 1 deletion R/cut_Datetime.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' `Datetime.colname`.
#' @param unit Unit of binning. See [lubridate::round_date()] for examples. The default is `"3 hours"`.
#' @param type One of `"round"`(the default), `"ceiling"` or `"floor"`. Setting
#' chooses the relevant function from [lubridate].
#' chooses the relevant function from \pkg{lubridate}.
#' @param Datetime.colname column name that contains the datetime. Defaults to
#' `"Datetime"` which is automatically correct for data imported with
#' [LightLogR]. Expects a `symbol`. Needs to be part of the `dataset`.
Expand Down
30 changes: 1 addition & 29 deletions R/data.r
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,4 @@
#' \item{Id}{A `character` vector indicating whether the data is from the `Participant` or from the `Environment`.}
#' }
#' @source <https://www.tscnlab.org>
"sample.data.environment"


#' A vector of all supported devices for import functions
#'
#' These are all supported devices where there is a dedicated import function.
#' Import functions can be called either through [import_Dataset()] with the
#' respective `device = "device"` argument, or directly, e.g.,
#' `import$ActLumus()`.
#'
#' @format `supported.devices` A character vector, listing all supported devices
#' \describe{
#' \item{suppored.devices}{strings}
#' }
"supported.devices"

#' A list of the specific device import functions
#'
#' These expressions are used to import and prepare data from specific devices.
#' The list is made explicit, so that a user, requiring slight changes to the
#' import functions, (e.g., because a timestamp is formatted differently) can
#' modify or add to the list. The list can be turned into a fully functional
#' import function through `import_adjustment()`.
#'
#' @format `ll_import_expr` A list, with specific expressions for each supported device
#' \describe{
#' \item{ll_import_expr}{expressions}
#' }
"ll_import_expr"
"sample.data.environment"
6 changes: 3 additions & 3 deletions R/filter_Datetime.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' Filtering a dataset based on Dates or Datetimes may often be necessary prior
#' to calcuation or visualization. The functions allow for a filtering based on
#' simple `strings` or `Datetime` scalars, or by specifying a length. They also
#' support prior [dplyr] grouping, which is useful, e.g., when you only want to
#' support prior \pkg{dplyr} grouping, which is useful, e.g., when you only want to
#' filter the first two days of measurement data for every participant,
#' regardless of the actual date. If you want to filter based on times of the
#' day, look to [filter_Time()].
Expand All @@ -18,10 +18,10 @@
#' * If `length` is provided and one of start/end is not, the other will be calculated based on the given value.
#' * If `length` is provided and both of start/end are NULL, the time from the
#' respective start is taken.
#' @param length Either a Period or Duration from [lubridate]. E.g., `days(2) +
#' @param length Either a Period or Duration from \pkg{lubridate}. E.g., `days(2) +
#' hours(12)` will give a period of 2.5 days, whereas `ddays(2) + dhours(12)`
#' will give a duration. For the difference between periods and durations look
#' at the documentation from [lubridate]. Basically, periods model clocktimes,
#' at the documentation from \pkg{lubridate}. Basically, periods model clocktimes,
#' whereas durations model physical processes. This matters on several
#' occasions, like leap years, or daylight savings. You can also provide a
#' `character` scalar in the form of e.g. "1 day", which will be converted
Expand Down
4 changes: 2 additions & 2 deletions R/gg_day.r
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@
#' function (see examples).
#' @param x.axis.breaks,y.axis.breaks Where should breaks occur on the x and
#' y.axis? Expects a `numeric vector` with all the breaks. If you want to
#' activate the default behaviour of [ggplot2], you need to put in
#' activate the default behaviour of \pkg{ggplot2}, you need to put in
#' [ggplot2::waiver()].
#' @param y.scale.sc `logical` for whether scientific notation shall be used.
#' Defaults to `FALSE`.
#' @param geom What geom should be used for visualization? Expects a `character`
#' * `"point"` for [ggplot2::geom_point()]
#' * `"line"` for [ggplot2::geom_line()]
#' * `"ribbon"` for [ggplot2::geom_ribbon()]
#' * as the value is just input into the `geom_` function from [ggplot2], other variants work as well, but are not extensively tested.
#' * as the value is just input into the `geom_` function from \pkg{ggplot2}, other variants work as well, but are not extensively tested.
#' @param group Optional column name that defines separate sets. Useful for
#' certain geoms like `boxplot`.Expects anything that works with the layer
#' data [ggplot2::aes()]
Expand Down
2 changes: 1 addition & 1 deletion R/gg_days.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' @param y.axis.breaks Where should breaks occur on the y.axis? Expects a
#' `numeric vector` with all the breaks or a function that calculates them
#' based on the limits. If you want to activate the default behaviour of
#' [ggplot2], you need to put in [ggplot2::waiver()].
#' \pkg{ggplot2}, you need to put in [ggplot2::waiver()].
#' @param x.axis.breaks The (major) breaks of the x-axis. Defaults to
#' [Datetime_breaks()]. The function has several options for adjustment. The
#' default setting place a major break every 12 hours, starting at 12:00 of
Expand Down
Loading
Loading