Skip to content

Commit 24e45b9

Browse files
committed
Round before converting to integer
otherwise e.g. 0.9999999 becomes 0 instead of 1
1 parent 03dbffc commit 24e45b9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

R/getSoilProperties.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ getMeanPotentialCapillaryRiseRate <- function(
112112
]
113113
)
114114

115-
as.integer(estimateDaysOfGrowth(usage, yieldPower) * kr)
115+
days_of_growth <- estimateDaysOfGrowth(usage, yieldPower)
116+
117+
as.integer(round(days_of_growth * kr))
116118
}
117119

118120
# MEAN_POTENTIAL_CAPILLARY_RISE_RATES_SUMMER_MATRIX ----------------------------

0 commit comments

Comments
 (0)