I am Trying to make a list out of a certain Column of my DataFrame.
But it should depend on another column, if it schould be added to the list.
So for example if the dataframe is:
names <- c('Word1','Word2','Word3')
quant <- c(5, NA, 10)
my.data <- data.frame(names, quant)
Now I would only like to List the words with a quantity and leave out the ones with "NA". Is there a smart and fast way to do this? The final List in this case should be (Word1, Word3)
Thank you very much for your help. I am a beginner with R and my only soution would be a loop going through the dataFrame and check for every value.