Another gotcha:

1:2 produces integers, but c(1, 2) produces doubles. They're not equal, but they're printed the same.



@basepair @data_science Yes. It's confusing to people who know C or Java, where that would indicate a long int.

Other than using things like "identical", is there any way to tell ints from doubles in R? Do their behaviors ever differ?

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves. A STEM-oriented instance.

An inclusive free speech instance.
All cultures and opinions welcome.
Explicit hate speech and harassment strictly forbidden.
We federate with all servers: we don't block any servers.