Skip to content

Commit

Permalink
need to split particle_error before reassigning particle
Browse files Browse the repository at this point in the history
  • Loading branch information
jmineau committed Sep 24, 2024
1 parent ee05e64 commit 5ab1d56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions r/src/read_traj.r
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ read_traj <- function(file) {
# Handle particle error data
err_cols <- grepl('_err$', names(particle))
if (any(err_cols)) {
# Split particle data into particle and particle_error
particle <- particle[!err_cols]
# Split particle data into particle_error and particle
particle_error <- particle[err_cols]
particle <- particle[!err_cols]

# Strip '_err' from particle_error names
names(particle_error) <- gsub('_err$', '', names(particle_error))
Expand Down

0 comments on commit 5ab1d56

Please sign in to comment.