Another gotcha:

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

@data_science

Follow

@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
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.