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?

· · 0 · 1 · 0
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.