Values from a data.frame



I extract values from a data.frame, using this form:

Ys<-read_excel(path = "C:/Users/Maia/Desktop/Ys.xlsx", sheet = 1)

histogramaYs <- sqldf('select Ys
      from Ys
      where Ordem = "LQ01134205"


But, when I run this code, the graph "hist" can't plot cause:
Error in hist.default(histogramaYs) : 'x' must be a number

So, "histogramaYs" appears like a table in Data Environment... it's 1 Variable with 8 numeric values.
How can I transform "histogramaYs" to a numeric vector to plot my hist graph?



You can get the first column (which is unique here) with histogramaYs$YS. You should get the vector of numeric you want.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.