I am very new to Studio and programming languages at large, so please bear with me!

I am working through the Cambio training for R as a complete beginner, and I am working on a section explaining how to handle data sets with missing values, represented by NA.

The tutorial gives three examples of how these data sets can be manipulated: is.na(), na.omit(), and complete.cases()

These are the examples used:

heights <- c(2, 4, 4, NA, 6)

heights[!is.na(heights)]

na.omit(heights)

heights[complete.cases(heights)]

Each of these functions return the answer

[1] 2 4 4 6

and I don't quite understand how these three functions are different from one another. In the explanation provided by the tutorial, they reference the removal or inclusion of "incomplete cases" or "complete cases", and I don't know if these are the same as missing values, which is the language that was used to reference NA. If someone could explain simply it would be much appreciated!