I have a function custom_1
and when I use print(custom_1)
R prints the returned data.frame but also some text at the bottom such as
The final values used for the model were mtry = 10 and ntree = 250
What i want to do is print the data.frame and the text but every time I try to write to a file only the dataframe gets printed.
This is the code i've been using.
write.csv(print(custom_1), file="results2.csv")