Skip to content

Questions if distance matrices/count tables come from within R #24

@pschloss

Description

@pschloss

Currently we read in distance matrices and count tables from disk as if they were generated by mothur. But, if they were generated in R, how do we hand off the data to clustur without writing to/reading from disk?

This should be "easy" to do... Could we have a conversion function that converts between an object from stats::dist() or sparseMatrix and our read_dist() object or a data.frame object and our read_count() object? Possible functions convert_dist() / convert_count()

More challenging... Could we pass a memory address between packages? For example, if down the road we create a calc_dist() function that stores the distances as a pointer to a C++ object, can we pass that object to cluster() or do we need to output to a data.frame and then convert that to our pointer? What are the memory/speed considerations here? Are deep copies generated? It would be good to set up a toy package to see if we can create the pointer and pass it to cluster.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions