Skip to content

Conversation

@jeffbaumes
Copy link
Contributor

There are two problems when supporting R version 3.1:

  • The string of conversion seems to act differently, so I replaced it with no conversion (seems to work when data is a dataframe)
    dat <- tbl_df(as.data.frame(lapply(1:ncol(data), function(x) type.convert(as.character(data[,x])))))
  • dplyr now contains and uses a select_ function, and I put one in that appears to work ok (though there could still be issues with it)

Still to resolve

  • How to do the conversion correctly for R 3.1
  • How to export select_.treedata for R 3.0 when select_ is not defined. I attempted this in an else 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.

@jeffbaumes
Copy link
Contributor Author

@uyedaj @lukejharmon Please take a look. I may be a bit out of my league in R programming but I gave it a shot.

@jeffbaumes
Copy link
Contributor Author

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.

@uyedaj
Copy link
Contributor

uyedaj commented Nov 25, 2014

Ok, that makes sense. I'll look into how to make this more stable...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants