Skip to content

error in seek_inflection.R #3

@florale

Description

@florale

Hi Salma and Manuel,

I’m exploring your package and have run into an error in a few cases. I’ve noticed these cases often include descents, but wanted to check whether that might be why a DLMO time wasn’t produced. I’ve included reproducible code below.

test_data <- data.table(
  datetime = as.POSIXct(c(
    "2023-11-24 09:00:00",
    "2023-11-24 10:00:00",
    "2023-11-24 11:00:00",
    "2023-11-24 12:00:00",
    "2023-11-23 13:00:00",
    "2023-11-23 14:00:00",
    "2023-11-23 15:00:00"
  ), tz = "UTC"),
  melatonin = c(1.0, 3.4, 7.3, 11.2, 13.5, 10.8, 12.0)
)
dlmo_test <- calculate_dlmo(
  data = test_data,
  threshold = 4,
  fine_flag = TRUE
)

Was wondering if you have any insights? Thank you!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions