search for: fnlist

Displaying 1 result from an estimated 1 matches for "fnlist".

Did you mean: unlist
2012 Nov 28
3
write out list of lists with names
...uot;MU15")) I would like to write this to a text file in the form e.g. (each x is a value): MU10 MU.16? MU.19? MU.21? mean? sd x? x? x? x? x? MU11 MU.21? MU.22 mean sd x? x? x? x Where each list element is on a new block of three rows. After consulting Google I came across the following: fnlist <- function(x, fil){ z <- deparse(substitute(x)) cat(z, "\n", file = fil) nams <- names(x) for (i in seq_along(x) ){ cat(nams[i], "\n", x[[i]], "\n",file = fil, append = TRUE) } } fnlist(holdList, 'res.txt') However this doesn't print the names...