SCM

[#120] Add a convenient way to bind data to phylo4d objects

Date:
2008-02-27 06:28
Priority:
3
State:
Open
Submitted by:
Peter Cowan (pdc)
Assigned to:
Nobody (None)
Target Version:
v. 0.4
Summary:
Add a convenient way to bind data to phylo4d objects

Detailed description
Currently there isn't a good way to add data to a phylo4d object. Possibilities:

foo[, 'trait1'] <- blah
tdata(foo) <- blah
foo <- tbind(foo, blah)


Comments:

Message  ↓
Date: 2009-08-20 18:01
Sender: François Michonneau

Yes it's resolved. But it's only possible to pass a full data frame.

foo <- addData(foo, node.data=someNodeData)

I can't guarantee what happens if you try to do something like:
tdata(foo)[1,2] <- rnorm(1)

We don't have any methods (as far as I know) to deal with [<- in phylobase. These are fairly tricky to write in S4 from what I can remember...

Date: 2009-08-20 17:56
Sender: Ben Bolker

Is this resolved by addData? should we write tests for tdata()<- and remove it if bad things can happen?

Date: 2008-12-17 04:35
Sender: Steven Kembel

This may be difficult: There is an existing <- method for tdata/phylo4d, but since tdata(foo) and foo[,'trait1'] return a data.frame, the <- method for phylo4d is never called when the commands above are invoked (the base <- method is used), no error checking occurs, and bad things happen. Suggest removing these methods until we sort this out.

Attached Files:

Changes

No Changes Have Been Made to This Item

Thanks to:
Vienna University of Economics and Business Powered By FusionForge