r - Error when writing list to text file -


i'm trying write r package bibtex entries text file, error:

pkgs <- unique(installed.packages()[,1]) bibs <- lapply(pkgs, function(x) try(citation(x))) lapply(bibs, write, "bibs.txt", append=true, ncolumns=1000)  error in cat(list(...), file, sep, fill, labels, append) :    argument 1 (type 'list') cannot handled 'cat' 

what doing wrong?

the output of citation list error makes sense. can use tobibtex format more handled write

pkgs <- unique(installed.packages()[,1]) bibs <- lapply(pkgs, function(x) try(tobibtex(citation(x)))) lapply(bibs, write, "bibs.txt", append=true, ncolumns=1000) 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -