Skip to content

Error when specyfing subjects in ctStanDiscretePars #11

@Kyabdro

Description

@Kyabdro

I'm trying to plot specific subjects DRIFT matrix, however when specifying any integer in the subjects argument, this error is produced:

Error in if ("all" %in% subjects || dim(e[[matname]])[2] == 1) { :
missing value where TRUE / FALSE is required

I've noticed that the corresponding conditional part of the script is made to change the names of the object e from "DRIFT" to "pop_DRIFT" and so on:

for (matname in c("DRIFT", "DIFFUSIONcov", "asymDIFFUSION")) {
    if ("all" %in% subjects || dim(e[[matname]])[2] == 1) {
      ctpars[[matname]] <- e[[paste0("pop_", matname)]]
    }

I think this error is due to an uptade of ctExtract which does not give names such as "DRIFT" anymore but now directly give "pop_DIRFT", etc... I think the error might be resolved easily by modfying the script accordingly:

for (matname in c("pop_DRIFT", "pop_DIFFUSIONcov", "pop_asymDIFFUSION"))

Then deleting the first conditional part that is not usefull anymore.

Did I guessed rigth?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions