Skip to content

Commit

Permalink
Fix mat props generation in write_profile()
Browse files Browse the repository at this point in the history
  • Loading branch information
mrustl committed Jul 10, 2024
1 parent b6a55bc commit 05f6eb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/write_profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ write_profile <- function(profile,

n_materials <- length(unique(profile$profile$mat))

if(nrow(profile$mat_props) != length(unique(profile$profile$mat)) & min(profile$profile$x) != min(profile$mat_props$mat_depth)) {
if(nrow(profile$mat_props) != length(unique(profile$profile$mat)) | min(profile$profile$x) != min(profile$mat_props$mat_depth)) {
profile$mat_props <- tibble::tibble(mat_id = unique(profile$profile$mat),
mat_depth = if(n_materials > 1) {
c(rep(0, n_materials-1), min(profile$profile$x)
Expand Down

0 comments on commit 05f6eb8

Please sign in to comment.