Skip to content

Commit

Permalink
If there's no outcome column name, use the index
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvillage committed Jun 19, 2024
1 parent 9a904b3 commit ffdcc59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ pub fn calculate_r2s<'a>(
}
r.outcome = colnames
.as_ref()
.and_then(|c| c.get(j).map(|c| c.to_string()));
.and_then(|c| c.get(j).map(|c| c.to_string()))
.unwrap_or(j.to_string());
r
})
.collect::<Vec<_>>();
Expand Down

0 comments on commit ffdcc59

Please sign in to comment.