We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b2c7a3 commit 8900dd9Copy full SHA for 8900dd9
1 file changed
R/qsim_prepare.R
@@ -64,6 +64,12 @@ QSIM_prepare <-function(
64
warning("No Flow column called '", flow_column_name ,"' found. Sections defined as empty character.")
65
}
66
67
+ q <- if( is.null(flow_column_name)){
68
+ rep(NA, nrow(df_in))
69
+ } else {
70
+ df_in[[flow_column_name]]
71
+ }
72
+
73
df_in <- data.frame(
74
"ID" = df_in[[id_column_name]],
75
"section" = ifelse(
@@ -73,10 +79,7 @@ QSIM_prepare <-function(
79
"km" = df_in[[km_column_name]],
80
"date" = df_in[[date_column_name]],
81
"para" = df_in[[parameter_name]],
76
- "Q" = ifelse(
77
- is.null(flow_column_name),
78
- yes = rep(NA, nrow(df_in)),
- no = df_in[[flow_column_name]])
82
+ "Q" = q
83
)
84
85
df_in$site <- paste(
0 commit comments