Open jeffbaumes opened 9 years ago
@uyedaj @lukejharmon Please take a look. I may be a bit out of my league in R programming but I gave it a shot.
I honestly have no idea what that conversion line does, so I didn't decompose to find the true issue. Indeed rownames seem to disappear somewhere in the conversion. I have also noticed that both in select_ and near the end of the make treedata there is a line that attempts to set rownames, but there is no effect (row names remain unset) and I have no idea why. If those lines worked, the conversion line could be kept in and the row names would just be set later. But as it is, on R 3.1 removing that conversion was the only place I could figure out how to keep rownames in place for downstream processing.
Ok, that makes sense. I'll look into how to make this more stable...
There are two problems when supporting R version 3.1:
data
is a dataframe) dat <- tbl_df(as.data.frame(lapply(1:ncol(data), function(x) type.convert(as.character(data[,x])))))select_
function, and I put one in that appears to work ok (though there could still be issues with it)Still to resolve
select_.treedata
for R 3.0 when select_ is not defined. I attempted this in anelse
block, but someone would need to confirm on R 3.0 since I upgraded my system and now don't really want to go back :) - Or maybe we just don't support R 3.0 anymore and force people to upgrade.