Hamartiogonic,
@Hamartiogonic@sopuli.xyz avatar

NA and NULL values.

In R (programming language) they have some interesting differences. You can think of a vector as a train with many cars, and each can hold a number. Let’s say I have train with three cars and I store the number 2, 3 and 5 in them. That would be a normal well behaved vector (2, 3, 5).

I could take away one of those numbers and leave that seat vacant. It could look like this (2, NA, 5).

If I tell you to find the third number in that vector, that’s easy. It’s 5. If I tell you to find the ninth one, that just doesn’t make sense and the answer would be NULL.

So in other words, NA is a vacant seat with no number sitting in it. NULL is a place where there is no seat to begin with.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • oklahoma
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • SuperSentai
  • feritale
  • KamenRider
  • All magazines