write.table()
时间: 2023-11-24 10:07:29
浏览: 257
`write.table()`是一个在R[[语言](https://geek.csdn.net/educolumn/05c8de7581a582e6d46821757663ed30?spm=1055.2569.3001.10083)中](https://geek.csdn.net/educolumn/04987620776e6a687043deb27ae38e47?spm=1055.2569.3001.10083)用于将数据写入文本文件的[[函数](https://geek.csdn.net/educolumn/2319d2a62911adc34b96ea572d8225a2?spm=1055.2569.3001.10083)](https://geek.csdn.net/educolumn/ba94496e6cfa8630df5d047358ad9719?dp_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NDQ0MDg2MiwiZXhwIjoxNzA3MzcxOTM4LCJpYXQiOjE3MDY3NjcxMzgsInVzZXJuYW1lIjoid2VpeGluXzY4NjQ1NjQ1In0.RrTYEnMNYPC7AQdoij4SBb0kKEgHoyvF-bZOG2eGQvc&spm=1055.2569.3001.10083)。它可以将数据框、矩阵或向量等数据类型写入文本文件。下面是`write.table()`[函数](https://geek.csdn.net/educolumn/ba94496e6cfa8630df5d047358ad9719?dp_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NDQ0MDg2MiwiZXhwIjoxNzA3MzcxOTM4LCJpYXQiOjE3MDY3NjcxMzgsInVzZXJuYW1lIjoid2VpeGluXzY4NjQ1NjQ1In0.RrTYEnMNYPC7AQdoij4SBb0kKEgHoyvF-bZOG2eGQvc&spm=1055.2569.3001.10083)的语法:
write.table(x, file, sep = " ", dec = ".", row.names = TRUE, col.names = TRUE, quote = TRUE, ...)
```