SyntaxFix
Write A Post
Hire A Developer
Questions
Try out cat and sprintf in your for loop.
cat
sprintf
eg.
cat(sprintf("\"%f\" \"%f\"\n", df$r, df$interest))
See here