Search code examples
rdataframehistogram

How do I make a hist() in R for a .dat file which doesn't include header?


It's a large volume of data, arround 3mill. entries so for me it is hard to manage, and once I store the values and try the command hist() I always get the message x must be numeric. I already tried myval <- read.table('/Users/me/Desktop/only4_columna6.dat',header = FALSE) but it ain't working either.

Sorry btw i am a bit newbie in R.


Solution

  • Your dataset DOES include a header, so you should allow for that.

    myval <- read.table('/Users/me/Desktop/only4_columna6.dat', header = TRUE)
    hist(myval$QUAL)