jacob-long / dpm
Showing 1 of 2 files from the diff.
Other files ignored by Codecov

@@ -165,7 +165,9 @@
Loading
165 165
  if (length(wint_labs) > 0) {
166 166
    for (wint in wint_labs) {
167 167
      endog <- str_detect(wint, "(?<=pre\\().*(?=\\))")
168 -
      wint <- str_replace(wint, "(.*)(pre\\()(.*)(\\))(.*)", "\\1\\3\\5")
168 +
      while (stringr::str_detect(wint, "(?<=pre\\().*(?=\\))")) {
169 +
        wint <- str_replace(wint, "(.*)(pre\\()(.*)(\\))(.*)", "\\1\\3\\5")
170 +
      }
169 171
170 172
      my_row <- nrow(v_info) + 1
171 173
      v_info[my_row,] <- list(wint, wint, 0, endog,
@@ -183,15 +185,19 @@
Loading
183 185
        v_info[my_row, "max_lag"] <- max(lags)
184 186
      }
185 187
    }
186 -
    wint_labs <- stringr::str_replace(wint_labs, "(.*)(pre\\()(.*)(\\))(.*)",
187 -
                                      "\\1\\3\\5")
188 +
    while (stringr::str_detect(wint_labs, "(?<=pre\\().*(?=\\))")) {
189 +
      wint_labs <- str_replace(wint_labs, "(.*)(pre\\()(.*)(\\))(.*)",
190 +
                               "\\1\\3\\5")
191 +
    }
188 192
  }
189 193
190 194
  # Deal with time-varying by time-varying by constant interactions
191 195
  if (length(cint_labs) > 0) {
192 196
    for (cint in cint_labs) {
193 197
      endog <- str_detect(cint, "(?<=pre\\().*(?=\\))")
194 -
      cint <- str_replace(cint, "(.*)(pre\\()(.*)(\\))(.*)", "\\1\\3\\5")
198 +
      while (stringr::str_detect(cint, "(?<=pre\\().*(?=\\))")) {
199 +
        cint <- str_replace(cint, "(.*)(pre\\()(.*)(\\))(.*)", "\\1\\3\\5")
200 +
      }
195 201
196 202
      my_row <- nrow(v_info) + 1
197 203
      v_info[my_row,] <- list(cint, cint, 0, endog,
@@ -209,13 +215,15 @@
Loading
209 215
        v_info[my_row, "max_lag"] <- max(lags)
210 216
      }
211 217
    }
212 -
    cint_labs <- stringr::str_replace(cint_labs, "(.*)(pre\\()(.*)(\\))(.*)",
213 -
                                      "\\1\\3\\5")
218 +
    while (stringr::str_detect(cint_labs, "(?<=pre\\().*(?=\\))")) {
219 +
      cint_labs <- str_replace(cint_labs, "(.*)(pre\\()(.*)(\\))(.*)",
220 +
                               "\\1\\3\\5")
221 +
    }
214 222
  }
215 223
216 224
  constants <- c(constants, bint_labs)
217 225
  allvars <- unique(c(dv, v_info$root, constants, int_vars))
218 -
  allvars <- stringr::str_replace(allvars, "(.*)(pre\\()(.*)(\\))(.*)",
226 +
  allvars <- stringr::str_replace_all(allvars, "(.*)(pre\\()(.*)(\\))(.*)",
219 227
                                  "\\1\\3\\5")
220 228
221 229
  v_info$root[is.na(v_info$root)] <- v_info$term[is.na(v_info$root)]
Files Coverage
R 90.26%
Project Totals (8 files) 90.26%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading