Class of a column in the data frame

Hello!

So I imported a huge .log file through the Import Dataset option. Unfortunately, two of my fields (Temperature and Light, as seen in the screenshot) have been taken as characters, according to the summary of the data frame. As a result, I haven’t been able to perform calculations like mean and quartiles. Any idea what I can do to make it numeric again?

Hi Sameer,

as.numeric() converts values to numbers, but I suspect you have some non-numeric values somewhere in those columns that you’ll have to clean out first. Unless all the values are numeric, import will fall back to character or factor
types.

Also, please note that we are not able to do general R-help here, and try to limit our support to questions about the ROpenSci packkage, as well as more discussions about scientific computing and reproducibility. For
support on R questions in general, I would recommend:

By all means, please continue to use this forum if you have questions about our packages! It’s helpful to know how people use them and what we can make better.