Ellen Talbot gives us an overview of the different data types in R:
Now here’s something we didn’t cover in the video and is especially helpful if something just WILL NOT work and you’ve spent all morning panic eating biscuits.
You can write checks to see if something is numeric, or an integer, with
is.numeric()
oris.integer()
.The general “‘is.XXXXX()’” function will take many of the data types we cover here and more, and can be a real time/life saver.
We could also use
class()
here and inspect the result.^[You might recall thatclass(1)
had the result of “numeric” – R was not by default considering 1 as an integer for the purpose of theclass()
function. ### Special numbers As well asi
to denote imaginary numbers, there are some additional symbols you might encounter or want to use.
There’s a video as well as a full blog post.
Comments closed