gsDesign icon indicating copy to clipboard operation
gsDesign copied to clipboard

Improve spending function summary display

Open nanxstats opened this issue 3 years ago • 1 comments

When using sfLDOF(), the summary text can be a bit confusing:

summary(sfLDOF(alpha = 0.25, t = 0.5, param = 0))
#> "Lan-DeMets O'Brien-Fleming approximation spending function with none = 1"

@elong0527 wonders if it makes more sense to display "... with no parameters".

Since the relevant logic in sfLDOF() seems intentional and might be written this way for a reason, I will let you make the decision.

Technical details

The call sequence is summary.spendfn() -> sfLDOF(). Here, since param = 0, sfLDOF() will set param to 1, and set parname to "none". Then summary.spendfn() will print parname = param (none = 1).

https://github.com/keaven/gsDesign/blob/cbf9a9405ce50e5ae777bec73af17608b3f05c6a/R/gsMethods.R#L811-L816 https://github.com/keaven/gsDesign/blob/cbf9a9405ce50e5ae777bec73af17608b3f05c6a/R/gsSpending.R#L711-L717

nanxstats avatar Feb 18 '22 02:02 nanxstats

@elong0527 do you want to take a quick look at this?

nanxstats avatar Feb 08 '23 15:02 nanxstats