View source: R/f_core_output_formats.R
| setOutputFormat | R Documentation | 
With this function the format of the standard outputs of all rpact
objects can be changed and set user defined respectively.
setOutputFormat(
  parameterName = NA_character_,
  ...,
  digits = NA_integer_,
  nsmall = NA_integer_,
  trimSingleZeros = NA,
  futilityProbabilityEnabled = NA,
  file = NA_character_,
  resetToDefault = FALSE,
  roundFunction = NA_character_,
  persist = TRUE
)
| parameterName | The name of the parameter whose output format shall be edited.
Leave the default  | 
| ... | Ensures that all arguments (starting from the "...") are to be named and that a warning will be displayed if unknown arguments are passed. | 
| digits | How many significant digits are to be used for a numeric value.
The default,  | 
| nsmall | The minimum number of digits to the right of the decimal point in
formatting real numbers in non-scientific formats.
Allowed values are  | 
| trimSingleZeros | If  | 
| futilityProbabilityEnabled | If  | 
| file | An optional file name of an existing text file that contains output format definitions (see Details for more information). | 
| resetToDefault | If  | 
| roundFunction | A character value that specifies the R base round function
to use, default is  | 
| persist | A logical value indicating whether the output format settings
should be saved persistently. Default is  | 
Output formats can be written to a text file (see getOutputFormat()).
To load your personal output formats read a formerly saved file at the beginning of your
work with rpact, e.g. execute setOutputFormat(file = "my_rpact_output_formats.txt").
Note that the parameterName must not match exactly, e.g., for p-values the
following parameter names will be recognized amongst others:
p value
p.values
p-value
pValue
rpact.output.format.p.value
format for details on the
function used internally to format the values.
Other output formats: 
getOutputFormat()
## Not run: 
# show output format of p values
getOutputFormat("p.value")
# set new p value output format
setOutputFormat("p.value", digits = 5, nsmall = 5)
# show sample sizes as smallest integers not less than the not rounded values
setOutputFormat("sample size", digits = 0, nsmall = 0, roundFunction = "ceiling")
getSampleSizeMeans()
# show sample sizes as smallest integers not greater than the not rounded values
setOutputFormat("sample size", digits = 0, nsmall = 0, roundFunction = "floor")
getSampleSizeMeans()
# set new sample size output format without round function
setOutputFormat("sample size", digits = 2, nsmall = 2)
getSampleSizeMeans()
# reset sample size output format to default
setOutputFormat("sample size")
getSampleSizeMeans()
getOutputFormat("sample size")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.