Skip to content

invalid 'type' (list) of argument #127

Open
@ArtPoon

Description

@ArtPoon

Ran into a different problem:

> set.seed(1234)
> outer.tree <- load.outer.tree(model)
> plot(outer.tree)
Error in max(sapply(comp$get.lineages(), function(line) line$get.sampling.time())) : 
  invalid 'type' (list) of argument

This occurs because the comp object has no Lineages:

> node
[1] "ID316_1"
> comp
<Compartment>
  Public:
    add.lineage: function (new.lineage) 
    clone: function (deep = FALSE) 
    copy: function (deep = FALSE) 
    get.branching.time: function () 
    get.lineages: function () 
    get.name: function () 
    get.sampling.time: function () 
    get.source: function () 
    get.type: function () 
    initialize: function (name = NA, type = NA, source = NA, branching.time = NA, 
    is.unsampled: function () 
    remove.lineage: function (ex.lineage) 
    set.branching.time: function (new.branching.time) 
    set.sampling.time: function () 
    set.source: function (new.source) 
    set.type: function (new.type) 
    set.unsampled: function (is.unsampled) 
  Private:
    branching.time: 519
    deep_clone: function (name, value) 
    lineages: list
    name: ID316_1
    sampling.time: NA
    source: Compartment, R6
    type: CompartmentType, R6
    unsampled: FALSE
> comp$get.lineages()
list()

Originally posted by @ArtPoon in https://github.com/PoonLab/twt/issue_comments/577884445

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions