Reputation: 401
I have got an output like this( t test output)
I want to combine them. But it came like this. Values are same only but not in the above format.
How can we save all of them in a txt format in the first mentioned format?
Upvotes: 4
Views: 7112
Reputation: 78630
You can use capture.output
to print the objects and save the output into a character vector:
chars <- capture.output(print(t_SVI_Chennai), print(t_SVI_Mumbai))
You can then write it to a file with writeLines
, such as:
writeLines(chars, con = file("output.txt"))
Upvotes: 12