Package: digiRhythm 2.3

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.3.tar.gz
digiRhythm_2.3.zip(r-4.5)digiRhythm_2.3.zip(r-4.4)digiRhythm_2.3.zip(r-4.3)
digiRhythm_2.3.tgz(r-4.4-any)digiRhythm_2.3.tgz(r-4.3-any)
digiRhythm_2.3.tar.gz(r-4.5-noble)digiRhythm_2.3.tar.gz(r-4.4-noble)
digiRhythm_2.3.tgz(r-4.4-emscripten)digiRhythm_2.3.tgz(r-4.3-emscripten)
digiRhythm.pdf |digiRhythm.html
digiRhythm/json (API)

# Install 'digiRhythm' in R:
install.packages('digiRhythm', repos = c('https://nasserdr.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

On CRAN:

5.86 score 20 scripts 411 downloads 14 exports 51 dependencies

Last updated 3 days agofrom:04c2e9464b. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 17 2024
R-4.5-winOKNov 17 2024
R-4.5-linuxOKNov 17 2024
R-4.4-winOKNov 17 2024
R-4.4-macOKNov 17 2024
R-4.3-winOKNov 17 2024
R-4.3-macOKNov 17 2024

Exports:actogramdaily_activity_wrap_plotdaily_average_activitydf_act_infodfcdgm_periodicitydiurnalitydiurnality_customTimeshighest_possible_harm_cutoffimport_raw_activity_datais_dgm_friendlylomb_scargle_periodogramremove_activity_outliersresample_dgm

Dependencies:bitbit64clicliprcolorspacecpp11crayondplyrfansifarvergenericsggplot2gluegtablehmsisobandlabelinglatticelifecyclelubridatemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigpracmaprettyunitsprogresspurrrR6RColorBrewerreadrrlangscalesstringistringrtibbletidyrtidyselecttimechangetzdbutf8vctrsviridisLitevroomwithrxtszoo

Computing the DFC/HP and manipulating the functions returned objects

Rendered fromDFC_and_HP_and_changing_plots.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2024-07-25
Started: 2022-07-04

Further options of visualization in DigiRhythm

Rendered fromVisualisation.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2024-07-25
Started: 2023-01-05

Loading and preprocessing data in DigiRhythm

Rendered fromLoading_and_preprocessing_data_in_DigiRhythm.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2024-07-25
Started: 2022-07-04

Visualizing actograms, average activity and diurnality index

Rendered fromActgram_diurnality_avg_activity.Rmdusingknitr::rmarkdownon Nov 17 2024.

Last update: 2024-07-25
Started: 2022-07-04

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
Computes the diurnality index, using different start and end definitions for each day and night, based on an activity dataframediurnality_customTimes
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
timedata Dataset of start and end of day and nighttimedata