Skip to content

Shinytest2#100

Open
Amycai224 wants to merge 13 commits intomainfrom
shinytest2
Open

Shinytest2#100
Amycai224 wants to merge 13 commits intomainfrom
shinytest2

Conversation

@Amycai224
Copy link
Collaborator

change shinytest to shinytest2

@jepusto
Copy link
Owner

jepusto commented Mar 6, 2026

Thanks. I still see two failing tests in test-SCD-effect-sizes.R. Could you take a look at those please?

Amy Cai and others added 4 commits March 9, 2026 20:07
Copy link
Owner

@jepusto jepusto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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))] <-
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) %>%
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) %>%
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments above about html_table() options.

app$wait_for_idle()
output_app_table <-
read_html(output_app) %>%
xml2::read_html(output_app)%>%
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why xml2 here but rvest everywhere else?

output_app_table <-
read_html(output_app) %>%
read_html(output_app) %>%
html_table(fill = TRUE) %>%
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments above on html_table() options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants