do you think I can add a melt function in this loop?
for (i in unique(df$year))
{dfnames<- paste("df",i, sep = "_")
assign(dfnames, df[df$year==i,])}
I just want to reshape all the subsets that I am generating with that loop. I would like to add this command in the loop, if it is possible:
melt(df_i, id.vars = c("Company_name","year","ID","Status"),na.rm=F)