diann-rpackage
diann-rpackage copied to clipboard
Fix pivot function
When you have a single column data frame, the result of piv[order(rownames(piv)), ]
is actually a numeric vector. When a data frame with only one column is subsetted, R will automatically drop the data frame structure and convert it to a vector. Therefore, the rownames are lost.