Hello, is there already a function in any R package which does source code formatting of deparsed lists?
Let's create the following list: x <- list(a = round(rnorm(3), 2), b = round(rnorm(3), 2)) xx <-c(aa = round(rnorm(30)), f = function(a) a + b, list(x, x)) Now, I want deparse it in a way that yields something like: list( aa = c(0.25, 0.18, 0.84, -1.25, 0.09, -0.99, 1.64, 1.42, -1.29, -0.14, -1.07, -1.05, 0.98, 0.33, 1.76, -1.66, 0.96, -0.21, -1.29, 0.78, -0.4, -1.63, -0.78, -1.05, 1.27, -1.44, 0.12, -0.4, 0.02, 1.03), f = function (a) a + b, list( a = c(2.22, 0.36, 0.74), b = c(0.46, 0.41, 1.46) ), list( a = c(2.22, 0.36, 0.74), b = c(0.46, 0.41, 1.46) ) ) Thanks a lot! Thomas P. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.