Skip to contents

Convert a Named Vector to a Data Frame

Usage

namedVectorToDataFrame(x)

Arguments

x

named vector

Value

data frame with columns name, containing the names of x

and value, containing the values of x

Examples

namedVectorToDataFrame(c(a = 1, b = 2, c = 3))
#>   name value
#> 1    a     1
#> 2    b     2
#> 3    c     3