Sunday, December 15, 2013

R - Comment Lines in Data File


Today I learned that you can have comments lines in data files. You need to include comment.char="#" as an argument to read.csv() and use whatever symbol you want, though a # (octothorpe) would be consistent with commenting in Rscript.

Example:
data <- read.csv("../datasets/heatmaps_in_r.csv", comment.char="#")

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete