I have a dataframe, DF, which has two columns. The first column has the names of individuals the second column has the height, in cm, of the corresponding individuals. If the height of an individual is not stated in a particular row, that row has a particular 'character' variable. I am trying to process my data and just use the data where the heights are stated. How do I separate DF so that I just work with data where the individuals heights are stated? Apologies, but i did not know how to create a dataframe on this site?
Asked
Active
Viewed 20 times
1 Answers
0
generally what you are looking for is filter. you can do this several ways but here is one:
library(tidyverse)
DF <- filter(DF, height != 'na')
note: i am guessing at your variable names since you didn't give them, but you should use the names of the columns and the proper "character" that is used to denote no height entered.

Puddlebunk
- 493
- 3
- 10