Skip to content

Error in R stochtree::bcf when pi_train is not provided #90

@drizmiz

Description

@drizmiz

When calling stochtree::bcf in R without providing the parameters pi_train and pi_test, an error occurs:

Error in rep(1/num_cov_orig, ncol(pi_train)) : invalid 'times' argument

After investigation, I found that if the vector pi_train is provided, the function transforms it into a matrix. However, when pi_train is not provided and is generated within the function, this step is skipped, so it does not have a column count. Additionally, even when pi_train is provided, after transformation, ncol(pi_train) is always 1, which does not seem to be the intended behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions