Package: digiRhythm 2.2

Hassan-Roland Nasser

digiRhythm: Analyzing Animal's Rhythmicity

Analyze and visualize the rhythmic behavior of animals using the degree of functional coupling (See Scheibe (1999) <doi:10.1076/brhm.30.2.216.1420>), compute and visualize harmonic power, actograms, average activity and diurnality index.

Authors:Hassan-Roland Nasser [aut, cre], Marie Schneider [aut, ctb], Joanna Stachowicz [aut, rev], Christina Umstaetter [aut, ths]

digiRhythm_2.2.tar.gz
digiRhythm_2.2.tar.gz(r-4.5-noble)digiRhythm_2.2.tar.gz(r-4.4-noble)
digiRhythm_2.2.tgz(r-4.4-emscripten)digiRhythm_2.2.tgz(r-4.3-emscripten)
digiRhythm.pdf |digiRhythm.html
digiRhythm/json (API)

# Install 'digiRhythm' in R:
install.packages('digiRhythm', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/nasserdr/digirhythm/issues

Datasets:
  • df516b_2 - Df516b_2 Activity Data Sets
  • df603 - Df603 Activity Data Sets
  • df625 - Df625 Activity Data Sets
  • df678_2 - Df678_2 Activity Data Sets
  • df689b_3 - Df689b_3 Activity Data Sets
  • df691b_1 - Df691b_1 Activity Data Sets
  • df759a_3 - Df759a_3 Activity Data Sets
  • timedata - Timedata Dataset of start and end of day and night

14 exports 0.49 score 51 dependencies 20 scripts 524 downloads

Last updated 1 months agofrom:4b324dd2cb. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKAug 31 2024
R-4.5-linuxOKAug 31 2024

Exports:actogramdaily_activity_wrap_plotdaily_average_activitydf_act_infodfcdgm_periodicitydiurnalityhighest_possible_harm_cutoffimport_raw_activity_datais_dgm_friendlylomb_scargle_periodogramremove_activity_outliersresample_dgmsliding_DI

Dependencies:bitbit64clicliprcolorspacecpp11crayondplyrfansifarvergenericsggplot2gluegtablehmsisobandlabelinglatticelifecyclelubridatemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigpracmaprettyunitsprogresspurrrR6RColorBrewerreadrrlangscalesstringistringrtibbletidyrtidyselecttimechangetzdbutf8vctrsviridisLitevroomwithrxtszoo

Computing the DFC/HP and manipulating the functions returned objects

Rendered fromDFC_and_HP_and_changing_plots.Rmdusingknitr::rmarkdownon Aug 31 2024.

Last update: 2024-08-01
Started: 2022-08-12

Further options of visualization in DigiRhythm

Rendered fromVisualisation.Rmdusingknitr::rmarkdownon Aug 31 2024.

Last update: 2024-08-01
Started: 2022-11-15

Loading and preprocessing data in DigiRhythm

Rendered fromLoading_and_preprocessing_data_in_DigiRhythm.Rmdusingknitr::rmarkdownon Aug 31 2024.

Last update: 2024-08-01
Started: 2022-08-12

Visualizing actograms, average activity and diurnality index

Rendered fromActgram_diurnality_avg_activity.Rmdusingknitr::rmarkdownon Aug 31 2024.

Last update: 2024-08-01
Started: 2022-08-12

Readme and manuals

Help Manual

Help pageTopics
Plot a an single actogram over a period of time for a specific variableactogram
Plot daily average over a period of time for a specific variable.daily_activity_wrap_plot
Plot daily average over a period of time for a specific variable.daily_average_activity
Outputs some information about the activity dataframedf_act_info
df516b_2 Activity Data Setsdf516b_2
df603 Activity Data Setsdf603
df625 Activity Data Setsdf625
df678_2 Activity Data Setsdf678_2
df689b_3 Activity Data Setsdf689b_3
df691b_1 Activity Data Setsdf691b_1
df759a_3 Activity Data Setsdf759a_3
Computes the Degree of Function coupling (DFC), Harmonic Part (HP) and Weekly Lomb-Scargle Spectrum (LSP Spec) for one variable in an activity dataset. The dataset should be digiRhythm friendly.dfc
Returns the periodicity of a digiRhythm dataframedgm_periodicity
Computes the diurnality index based on an activity dataframediurnality
Function to calculate the smallest possible harmonic to consider given a sampling frequency. The minimum possible harmonic = 2 x the period of the maximum frequency according to the Shanon theorem. Example: if the sampling period is 15 min, the minimum possible treatable period is 30 minutes and that corresponds to the 48th harmonic (24 hours * 60 minutes / 48 = 30 minutes)highest_possible_harm_cutoff
Reads Raw Activity Data from csv filesimport_raw_activity_data
Informs if a dataset is digiRhythm Friendlyis_dgm_friendly
Returns the level given the p-value computed with pbaluev (2008). Copied from the LOMB library.levopt
Computes the Lomb Scargle Periodogram and returns the information needed for computing the DFC and HP. A plot visualizing the Harmonic Frequencies presence in the spectrum is possible. The function is inspired from the Lomb library in a great part, with modifications to fit the requirements of harmonic powers and computation of the DFC. This function is inspired by the lsp function from the lomb package and adapted to add different colors for harmonic and non harmonic frequencies in the signal. For more information about lomb::lsp, please refer to: https://cran.r-project.org/web/packages/lomb/lomb_scargle_periodogram
Returns p-value of a frequency peak according to pbaluev (2008) given Z, fmax and tm. Reused from the LOMB library (https://rdrr.io/cran/lomb/)pbaluev
Print if Verbose is trueprint_v
Remove outliers from the dataremove_activity_outliers
Change the sampling of a digiRhythm friendly datasetresample_dgm
Computes the diurnality index, using different start and end definitions for each day and night, based on an activity dataframesliding_DI
timedata Dataset of start and end of day and nighttimedata