Comments (3)
I think we should try the tibble approach. It seems to me to be the most straightforward, and preserves the relationship between the metadata and the matrices (which was the main advantage/reason behind putting them in the data frame in the first instance.
I guess I can just add tibble
to the imports bit of the DESCRIPTION
, and then set the data slot to class "tibble".
from rcompadre.
I think it can all be done within the initialize
method. The data
slot can remain "data.frame" within setClass
because tibbles always retain the "data.frame" class too.
#' @importFrom methods callNextMethod validObject
#' @importFrom tibble as_tibble
setMethod("initialize", "CompadreData",
function(.Object, ...) {
.Object <- methods::callNextMethod()
.Object@data <- as_tibble(.Object@data)
methods::validObject(.Object)
.Object
})
### then run devtools::document() and add tibble to imports
from rcompadre.
closed by #43 and subsequent updates
from rcompadre.
Related Issues (20)
- Add a function to output a Matlab compatible data file
- Function to load local com(p)adre .Rdata files HOT 3
- Change name of matrixClass to MatrixClass for consistency HOT 4
- Check that Rcompadre works well with the old database versions HOT 1
- Add method for droplevels
- Add function to create CompadreDB object from matrices and metadata. HOT 2
- Write vignette to illustrate `cdb_build_cdb` functionality HOT 1
- cdb_rbind - allow binding of COMPADRE objects with different metadata.
- mat_to_string fails when whole matrix is NA HOT 1
- filter error when compiling vignette. Error in storage.mode(x) <- "double" :
- Improve vignette to illustrate cdb_build_cdb functionality
- Add argument to cdb_fetch to automatically add error flag columns HOT 1
- Add vignette with NO piping HOT 1
- Add unit tests to cdb_build_cdb
- Standardize case convention on database column names HOT 1
- add methods for CompadreDB objects or supress helper text HOT 2
- suggestion for additional calculations across matrices: mat_sd and mat_median HOT 2
- 2 small taxonomic inconsistencies for crocodiles and turtles? HOT 1
- cdb_rbind improvement
- popbio should be popdemo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcompadre.