I have a data.frame that looks like this
df = data.frame(ticker = c(rep("AAPL", 2), rep("MSFT",2)),
Date = c("2019", "2017", "2017", "2016"))
print(df)
ticker Date
1 AAPL 2019
2 AAPL 2017
3 MSFT 2017
4 MSFT 2016
I would like to group by ticker and create a string for each row (Date). For example, I would like to create 2 strings that look like this.
x = "SomeOtherString"
"SomeOtherStringAAPL20192017"
"SomeOtherStringMSFT20172016"