在r程序中使用write将数据写到文本文件中 a <- as.character(factorialZ(1000)) write(a, file='abcd.txt') write写的文件,默认保存到Documents,即当前用户的“文档”文件夹中。