The R-help for feather_metadata
states "Returns the dimensions, field names, and types; and optional dataset description." but there is no information on how to add the data description. I hoped it could be added as an attribute but that doesn't seem to work.
library(feather)
dat <- data.frame(a = 1:3, b = 4:6)
attr(dat, "description") <- "A data.frame"
write_feather(dat, "df.feather")
str(feather_metadata("df.feather"))
str
returns:
List of 5
$ path : chr "df.feather"
$ dim : int [1:2] 3 2
$ types : Named chr [1:2] "integer" "integer"
..- attr(*, "names")= chr [1:2] "a" "b"
$ description: chr ""
$ version : int 2
- attr(*, "class")= chr "feather_metadata"
I just submitted a PR for this functionality. If you are willing to install from source, you can install from https://github.com/hrbrmstr/feather and: