hypoparsr
takes a different approach to CSV parsing by creating different parsing hypotheses for a given file and ranking them based on data quality features.
-
the latest released version from CRAN with
install.packages("hypoparsr")
-
the latest development version from github with
devtools::install_github("tdoehmen/hypoparsr")
If you encounter a bug, please file a minimal reproducible example on github.
# generate a CSV
csv <- tempfile()
write.csv(iris, csv, row.names=FALSE)
# call hypoparsr
res <- hypoparsr::parse_file(csv)
# show result overview
print(res)
# get result data frames
best_guess <- as.data.frame(res)
second_best_guess <- as.data.frame(res, rank=2)