Conversation
|
Thanks. I still see two failing tests in |
Change testthat.R add app$wait_for_idle() to test-SCD
output_app <- output_app[[1]] }
jepusto
left a comment
There was a problem hiding this comment.
Thanks for taking care of the remaining test failures. I've commented on a few points in the code where things can be cleaned up and simplified. Please attend to these and then clean up the test file by removing any extra comments that are not descriptive (e.g., # CHANGED and skip() calls that are commented out).
| return(output_app_table) | ||
| tbl <- rvest::html_table(rvest::read_html(output_app), fill = TRUE)[[1]] | ||
| tbl[tbl == "-"] <- NA | ||
| tbl[, intersect(c("Est","SE","CI_lower","CI_upper","baseline_SD"), names(tbl))] <- |
There was a problem hiding this comment.
Please use dplyr syntax for this type of manipulation, as in
tbl %>%
mutate(
across(c("Est","SE","CI_lower","CI_upper","baseline_SD"), as.numeric)
)
|
|
||
| return(output_app_table) | ||
| tbl <- rvest::html_table(rvest::read_html(output_app), fill = TRUE)[[1]] | ||
| tbl[tbl == "-"] <- NA |
There was a problem hiding this comment.
Use the convert and na.strings arguments of html_table(). I think this will make it unnecessary to then apply as.numeric() to all the variables.
| output_app_table <- | ||
| read_html(output_app) %>% | ||
| read_html(output_app) %>% | ||
| html_table(fill = TRUE) %>% |
There was a problem hiding this comment.
use the convert and na.string arguments of html_table() here too, so that the further data cleaning is unnecessary.
| output_app_table <- | ||
| read_html(output_app) %>% | ||
| xml2::read_html(output_app)%>% | ||
| html_table(fill = TRUE) %>% |
There was a problem hiding this comment.
See comments above about html_table() options.
| app$wait_for_idle() | ||
| output_app_table <- | ||
| read_html(output_app) %>% | ||
| xml2::read_html(output_app)%>% |
There was a problem hiding this comment.
Why xml2 here but rvest everywhere else?
| output_app_table <- | ||
| read_html(output_app) %>% | ||
| read_html(output_app) %>% | ||
| html_table(fill = TRUE) %>% |
There was a problem hiding this comment.
See comments above on html_table() options.
change shinytest to shinytest2