Entering edit mode
6.9 years ago
vinayjrao
▴
260
Hello,
I have a list in R, which I need to write into a file. When I try running write.table(data, file="molecules.txt")
, I get the following error -
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
arguments imply differing number of rows: 1, 5, 547
Could someone please help me understand the error and how to go about solving it?
Thanks.
That solved the problem. Could you please explain to me what the error was?
You said your input is list, however write.table requires vector, data frame or data table. That is why you get an error (I assume). To write as list you can use write.list function which i have not used so far.