-
Notifications
You must be signed in to change notification settings - Fork 17
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
Required lines to display in table which is not in data #32
Comments
Hi @NNaikp, So speaking only for the approach you'd take with We'll use a slightly modified version of
We then write an analysis function (which we will use for all the variables). Note if we didn't want the percentages there we would not need to specify the analysis function at all. Note here that analysis functions are passed the column observation count as
With that done the layout simply analyzes each of the desired variables:
Which gives us
Now as I noted this table is slightly different, as the patient counts are in the column header area rather than as a separate row. To get something more exactly like the displayed table we could do:
Note that the percentages are still being calculated based on those column counts, not actually on the row cell values. Access to prior calculated rows counts/data is possible only for subtable structures an analysis is nested within. If we wanted the total patient counts to be reprinted as context after pagination (which might make sense or very much not, depending on the goals), we would want that to be what we call a "group summary row" or more technically a "content row", which we would do like so:
Which gives us:
|
Hey @NNaikp
Tplyr can also include event counts along with total count rows which looks to be one of the requirements of the table above. |
Thanks @gmbecker and @elimillera for the elaborate replies! |
We often have an issue where we want to/are required to display all possible responses on the CRF in the output table, but not all responses are reported in the trial. This is the case for e.g. adjudication tables:
It happens every now and then that you only have a single or a few of these events, but still want to display all possible responses.
Previously the programmers just hardcoded it somewhere in the program. There are multiple issues with this:
We have made an input in our TFL package, that can eat required lines and place them. I wonder if some of the packages out there already has such a solution? Or maybe your company has done something better? 😃
(Excerpt from one of our vignettes)
The text was updated successfully, but these errors were encountered: