I have a dataframe like this
X 2001,2002,2003
JAN NA,1,2
JUN NA,2,3
DEC 1,2,NA
I want an empty vector to store values and generate a time series What can I do
Intended output formated by month and year, omit NAs
output=c(1,1,2,2,2,3)
How can I do?
as.vector(na.omit(unlist(df[-1])))