tscnlab/LightLogR: LightLogR 0.10.0
- 1. LIPID lab, EPFL
- 2. Technical University of Munich & Max Planck Institute for Biological Cybernetics
- 3. GTC Neuroscience Uni Tübingen
Description
General improvements and new functions
summary_table(),summary_overview(), andsummary_metrics()are a great set of new functions that give quick summaries across the whole dataset. Care has to be taken with these functions, as they are high level and will not perform well with a higly fragmented/irregular dataset.sample_groups()is a new function that makes it easy to reduce the number of groups either by random sampling, flexible ordering, or based on a condition.style_time()is a new convenience function that takes datetimes, times, or numeric input and outputs a clean time format (e.g., "03:45"). This is primarily used to style times in tables or plots.format_coordinates()is a new convenience function that takes a coordinates and formats them nicely for plots and tables.Datetime2Time()now allows forcirculartime through a sine-conversion of time of day - this is especially useful for averaging of times that (can) cross midnight, such as bed-times.Circular2Time()is a new function that back-convertscirculartime columns tohmstime. See the package{circular}for details on howcircularcolumns work.remove_partial_data()allows to specify a minimum duration of available data. Simply supply a negative duration to thethreshold.missingargument. E.g.,"-20 hours"will only keep groups with at least 20 hours of data. While this was easy before in case of groups of known total duration, 24 hours (e.g., simply set the threshold to 4 hours to get to 20 hours of data), it was not possible for groups of unknown total duration.importfunctions now support aversionargument. If there are multiple known formats for one supported device, the version can be changed. As of now, this is the case with theVEETdevice, which changed its format slightly withv2.1.17. This argument is also used for theActiwatch Spectrum, which requires several adjustments for a German locale (beyond simple adjustment of locale settings). #65supported_versions()is a new function that provides an overview which device versions are supported.add_Date_col()gained theas.countargument. If set to true, it will output the number of days since start. The basis are calendar days.add_states()now- allows for
startandendvariables to be of classInterval- this makes the function ready to work with output fromsc2interal()orsleep_int2Brown(). - works as expected when
force.tz = TRUE, i.e., the timestamp in the states dataset is forced to the timezone of the receiving time-series dataset. That is useful, e.g., when you know that the timestamp is correct, but was imported adUTCby default.
- allows for
Added many new resources to the documentation webpage (accessible through the nav menu), including an interactive online course for
LightLogR.filter_Datetime()&filter_Date():- When only
lengthis provided, but notstartnorend, the functions now respect grouping, i.e., the length will be taken from the first record (or last in the case offrom_start = FALSE) within each group. - the order of arguments now makes more sense in a typical use case, with
lengthbeing the first argument taken, thenstartandend
- When only
gg_states()now- allows for an individual height of the state indicators through
yminandymaxarguments - allows to calculate arbitrary metrics from the dataset to be used in the plot through the
extract.metricsargument. - combining the two above allows for powerful visualizations, where, e.g., the height of a status indicator is determined by a summary metric, like the median
- allows for a non-standard
Datetimecolumn through theDatetime.colnameargument.
- allows for an individual height of the state indicators through
gg_photoperiod()now- allows for an individual height of the state indicators through
yminandymaxarguments - allows for a non-standard
Datetimecolumn through theDatetime.colnameargument.
- allows for an individual height of the state indicators through
Bug fixes and small stuff
The
plotlypackage was moved to suggested dependency, as it only covers an edge case.The
janitorpackage is no longer a dependency, as a simpler version to find duplicates during import was implemented.VEETdevices import much faster now, thanks to an efficient way to construct the data table. Thanks to @ThomasKraft for raising this issue! #66gg_states()replaced the functiongg_state()for more consistent naming with otherstatesfunctions.gg_day()andgg_days()now have they.axisvariable and thegeomas first two arguments, putting the most often used arguments to the front.New device import:
MiEyefrom Circadian Health Innovations. There are two known datetime formats for the device:ymd HMS, anddmy HMS. Both are parsed.More flexible import for
ActLumusdevices: Data can start at any line. For computational efficiency, it will determine the correct starting row in the first file provided (filenames[1]) and use it for all files provided for import.log_zero_inflated()andexp_zero_inflated()have an updated reference.Brown_check()now also takes factor vectors forstate. This affects theBrownupstream functions that useBrown_check().gg_heatmap()has gained afacettingvariable to remove facetting altogether. Default isTRUE.Standard
y.axis.labelof visualization functions is nowMelanopic EDI (lx). Affectsgg_day(),gg_days(), andgg_heatmap().gg_day(): standardx.axis.labelisLocal time (HH:MM).aggregate_Date()andaggregate_Datetime()now contain a warning for...about partial matching of argument names.sleep_int2Brown()will sensibly fill in values for columns in theevening, should the state dataset contain more thanIntervalandSleepcolumns.
Files
tscnlab/LightLogR-v0.10.0.zip
Files
(52.0 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:ac1578229ff64b7481963cab5870d037
|
52.0 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/tscnlab/LightLogR/tree/v0.10.0 (URL)
Software
- Repository URL
- https://github.com/tscnlab/LightLogR