-1

What does the "$" mean in the following line of code?

db$Continent <- NA

Rui Barradas
  • 70,273
  • 8
  • 34
  • 66
Marcal
  • 9
  • 2

1 Answers1

-1

Generally speaking, the $ operator is used to extract or subset a specific part of a data object in R.

In your example, you're assigning NA to Continent, as @dario pointed out in the comments.

SikorskyS60
  • 160
  • 14
  • 1
    This answer is wrong. In the example OP is **not** looking for the Continent NA but **assigning** NA (missing value indicator) to the column/variable `Continent` – dario Apr 25 '22 at 10:41
  • Yikes, just realized that. Thanks for pointing out. I'll edit that real quick – SikorskyS60 Apr 25 '22 at 10:42