melt: Turn variable names and values into two columns
Description
Turn the names and values of all pending variables into two columns. These variables are inversely selected inside function (cols) and waiting to be melted. After melting, the data format changes from wide to long.
Usage
melt(data, cols = NULL)
Arguments
data
A data frame to melt, from the column start to the column end.
cols
Inversely selected columns inside function, except which are columns waiting to be melted.
Value
A long-format data frame from its original wide format.
Details
This function (dataprep::melt) will be used when reshape2 is not installed.
References
1. Example data is from https://smear.avaa.csc.fi/download. It includes particle number concentrations in SMEAR I Varrio forest.
2. Wickham, H. 2007. Reshaping data with the reshape package. Journal of Statistical Software, 21(12):1-20.
# NOT RUN {# The first pending variable contains only NAmelt(data,1:4)
# Number concentrations of modes and total particles are not NAmelt(data1,1:2)
# }