Hello!
I am trying to plot a line chart, where each line would be a category that is in a different column (i.e. one line will be 'amnorte', another 'amlatina', and finally 'europa'). They should represent the count of occurrences in each year ('AN_BASE'), as values '1' would be counted, and '0' should not be counted.
Please find below a reprex:
new_df_regionalismo<-data.frame(
stringsAsFactors = FALSE,
AN_BASE = c(2003,2003,2003,2003,2004,
2004,2004,2004,2004,2004,2005,2005,2005,2005,2005),
amnorte = c("0","0","0","0","1","0",
"0","0","0","0","1","0","0","0","0"),
amlatina = c("0","1","0","1","0","1",
"0","0","1","0","0","0","0","0","0"),
europa = c("0","1","0","0","0","0",
"0","0","0","0","0","0","0","1","0")
)
Thank you for your help