Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info as the output of sim_gs_n() #273

Merged
merged 21 commits into from
Aug 20, 2024

Conversation

LittleBeannie
Copy link
Collaborator

@LittleBeannie LittleBeannie commented Aug 8, 2024

See issue #259 .

@LittleBeannie LittleBeannie added the development New feature or request label Aug 8, 2024
@LittleBeannie LittleBeannie self-assigned this Aug 8, 2024
@LittleBeannie LittleBeannie linked an issue Aug 8, 2024 that may be closed by this pull request
@LittleBeannie LittleBeannie marked this pull request as draft August 8, 2024 19:28
@LittleBeannie LittleBeannie requested a review from keaven August 16, 2024 14:29
@LittleBeannie LittleBeannie marked this pull request as ready for review August 16, 2024 14:29
Copy link
Collaborator

@keaven keaven left a comment

Choose a reason for hiding this comment

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

Looks good

@LittleBeannie LittleBeannie merged commit 2ed558b into main Aug 20, 2024
7 checks passed
@LittleBeannie LittleBeannie deleted the 259-can-we-add-the-info-to-the-output-of-sim_gs_n branch August 20, 2024 14:35
@jdblischak
Copy link
Collaborator

The title of this PR is confusing. It looks like you added the columns info and info0 only to the test function wlr(). This has broken the sim_gs_n() feature of using different tests per cut. What is the timeline for adding info and info0 columns to rmst() and milestone()? Can we create an Issue for this?

@LittleBeannie
Copy link
Collaborator Author

Adding info and info0 to rmst and milestone will be a very future plan. I am wondering if sim_gs_n could bind_rows results from different tests. For example,
image
This bind_rows will also help with adding maxcombo (instead of reporting Z score, we report p-values) to sim_gs_n.

@jdblischak
Copy link
Collaborator

Good idea. We can filling missing columns with NAs. {dplyr} is not a dependnecy of {simtrial}, but {data.table} is, and it has an equivalent function.

library("dplyr")
library("tibble")
df1 <- tibble(x = 1:2, y = letters[1:2])
df2 <- tibble(x = 4:5, z = 1:2)
r1 <- bind_rows(df1, df2)

rbind(df1, df2)
## Error in match.names(clabs, names(xi)) :
##   names do not match previous names

library("data.table")
r2 <- data.table::rbindlist(list(df1, df2), use.names = TRUE, fill = TRUE)

identical(as.data.frame(r1), as.data.frame(r2))
## [1] TRUE

@LittleBeannie
Copy link
Collaborator Author

Shall we create a issue for this?

@jdblischak
Copy link
Collaborator

Shall we create a issue for this?

I already have RStudio open, so I'm going to attempt to do it right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the info to the output of sim_gs_n()
3 participants