Skip to contents

Adds k, the number of units (patients) whose difference has the sign of the summary estimate: up when the estimate is positive or zero and n - up otherwise, as reported in "k/n patients".

Usage

PlotDataDirection(data, n, up, estimate, into = "k")

Arguments

data

A data frame.

n

Column with the number of units.

up

Column with the number of positive differences.

estimate

Column with the summary estimate.

into

Name of the new column.

Value

data with the count column.

Examples

PlotDataDirection(data.frame(n = c(9, 9), up = c(9, 1), est = c(1.1, -0.4)), "n", "up", "est")
#>   n up  est k
#> 1 9  9  1.1 9
#> 2 9  1 -0.4 8