dfput.RdFormat a data.frame as a data.frame(...) call with column vectors, for pasting into Carob scripts. Unlike dput, the output omits structure(), row.names, and class and uses readable column-wise c(...) vectors.
dfput(x, name=NULL, digits = NULL, indent = 4, drop=NULL)The formatted code string (invisibly); also printed for interactive use.
xy <- data.frame(
adm1 = c("Dodoma", "Manyara"),
adm2 = c("Kongwa", "Kiteto"),
longitude = c(36.6104, 36.8266),
latitude = c(-5.9767, -5.1963),
geo_undertainty = c(56168, 84918)
)
dfput(xy, name = "geo")
#> geo <- data.frame(
#> adm1 = c("Dodoma", "Manyara"),
#> adm2 = c("Kongwa", "Kiteto"),
#> longitude = c(36.6104, 36.8266),
#> latitude = c(-5.9767, -5.1963),
#> geo_undertainty = c(56168, 84918)
#> )