matiasandina / homecage_quantification

Code for quantifying homecage activity
https://github.com/homecage_quantification
0 stars 0 forks source link

opt_flow first row should be set to zero #3

Closed matiasandina closed 4 years ago

matiasandina commented 4 years ago

The first row contains a huge number because of frame differentiation, it's meaningless, should be set to zero (or removed directly) on the processing side.

matiasandina commented 4 years ago

Possible fix while pooling data in app.R (not part of this repo). See replace

pooled_data <- purrr::map(files,
           function(tt) read_csv(tt, col_names = "total_flow") %>% 
               # replace first element with zero
               mutate(total_flow = replace(total_flow, 1, 0))
           ) %>%
        bind_rows(.id="source")