I used the melt
function to combine some variable under a single column:
melt(p,id= c("year","month","carrier","carrier_name","airport","airport_name","arr_cancelled","arr_diverted","arr_delay"))
The melted data looks fine with all identifiers in place. The problem is the melted data is shown under 2 columns Variable
and Value
. I want to plot a graph using the data under Variable
but it is throwing the following error:
Error in eval(expr, envir, enclos) : object 'variable' not found.
Do I have to map the melted data under Variable
and Value
to something so as to make it useful. How can I use the melted data?