0

I a dataset whose matrix is delimited as follows multiple obs. of 1 variables :

>GC_percent
[1,] 0.4835822
[2,] 0.4782782
[...]
[5622,] 0.4968492
[5623,] 0.5076531

And I would draw a histogram with this one:

qplot(GC_percent, geom="histogram")

But inevitably it does not work:

Error: ggplot2 doesn't know how to deal with data of class matrix
Muramasa
  • 163
  • 2
  • 13

1 Answers1

1

As Roland said, ggplot2 needs a dataframe:

GC_percent <- as.data.frame(GC_percent)
qplot(GC_percent, geom="histogram")
Jaap
  • 81,064
  • 34
  • 182
  • 193