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

Read aggregated Embrace Plus and Nowatch data #20

Merged
merged 19 commits into from
Apr 25, 2024
Merged
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion R/read_and_process_embrace_plus.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ read_and_process_embrace_plus <- function(zipfile, tz = Sys.timezone()) {
#' @param data object from read_e4 function
process_embrace_plus <- function(data) {

eda_filt <- process_eda(data$EDA)
# omitting NAs: TBD
# the Embrace Plus aggregated files have a lot of NAs,
# for example when the device wasn't able to record anything
# we need to decide how to handle these NAs
eda_filt <- process_eda(na.omit(data$EDA))
Comment on lines +44 to +48
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you know I'm no expert when it comes to analysing this data, but thebutter_lowpass_filter doesn't work the same as it does with other devices when there are a lot of NAs. The aggregated Embrace Plus data also has "data" present when the device wasn't worn. When I removed the NAs the flow seemed to work fine again, but would be good to double check what the implications are

flog.info("EDA data filtered.")

eda_peaks <- find_peaks(eda_filt)
Expand Down
Loading