You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider using S4Vectors::DataFrame instead of data.frame for obs/var #554
Most of the time yes. You do sometimes need to do something like as.data.frame(df) for things like ggplot(). The behaviour is equivalent so it depends if the function actively checks the class or not.
They are already used by SingleCellExperiment and other Bioconductor classes so people should be relatively familiar with them.
Potentially we could have an option to control which kind of data frame is used but I feel like that's just asking for trouble.
Activity
lazappi commentedon Oct 25, 2026
@rcannood What do you think?
rcannood commentedon Oct 25, 2026
Oh, that might be interesting!
Then Bioc would also finally stop complaining that we don't have any Bioc dependencies :p
Do
S4Vectors::DataFrame's work in the same way as regular data frames? Can you pass them to functions that would regularly expect regular data frames?lazappi commentedon Oct 26, 2026
Most of the time yes. You do sometimes need to do something like
as.data.frame(df)for things likeggplot(). The behaviour is equivalent so it depends if the function actively checks the class or not.They are already used by
SingleCellExperimentand other Bioconductor classes so people should be relatively familiar with them.Potentially we could have an option to control which kind of data frame is used but I feel like that's just asking for trouble.