Skip to contents

Extract the synthetic data frame from a synth_result

Usage

# S3 method for class 'synth_result'
as.data.frame(x, ...)

Arguments

x

A synth_result.

...

Unused.

Value

The synthetic data.frame (for m == 1).

Examples

df <- data.frame(id = 1:20, x = rnorm(20))
res <- synth(df, ~ id, method = "sample", seed = 1)
head(as.data.frame(res))
#>   id          x
#> 1  1  0.5429963
#> 2  2 -0.2827054
#> 3  3  1.1484116
#> 4  4 -1.6309894
#> 5  5  0.2553171
#> 6  6  2.0650249