# Classic dput prints directly to stdout
x <- iris[1, ]
dput(x)
# Traditional formatting using dput2
y <- dput2(x, collapse = "\n", trim = FALSE)
cat2(y)
# Single line formatting
z <- dput2(x)
cat2(z)
Run the code above in your browser using DataLab