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
Post a Comment