From a set of two variables:
df <- data.frame(stock = c("stockA", "StockA", "StockA", "StockB", "StockB"), na