我正在尝试将 R 包 bibtex 条目写入文本文件,但出现错误:
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 be handled by 'cat'
我究竟做错了什么?