0

I build a dataframe with a loop and rbind (which I think is why this problem comes up). Then when I print out the data frame it looks like this

           edge, my_f_price, book_f_price, my_d_price, book_d_price
1:1    9.8973782   113.8974         -112  -113.8974         -104
1:11  -1.1026218   113.8974         -105  -113.8974         -115
1:12  -7.6656557  -147.6657         -160   147.6657          140
1:13   1.9645988   107.9646         -110  -107.9646         -106

How do I remove the first column (1:1, 1:11, 1:12, 1:13), which isn't a true column, from the printout? I need to print this out to a txt file and that column is not wanted.

Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197
appleLover
  • 14,835
  • 9
  • 33
  • 50

1 Answers1

1
write.table(dd, file="output.csv", row.names=FALSE)

?Write.table should help you

Prasanna Nandakumar
  • 4,295
  • 34
  • 63