Skip to content

Issue: Error in comparison of mean.vect and censoring.thr due to length mismatch in function of model.selector #171

Open
@ZHBHSMILE

Description

@ZHBHSMILE

First of all, thank you for developing and maintaining this great package! It's been really helpful for my analysis. However, I encountered the following error while running the function:

Error in mean.vect > censoring.thr: 
(converted from warning) longer object length is not a multiple of shorter object length

This occurs during the execution of the following block of code:

if (max(obj.fnc) > 0) {
    censoring.thr = support[which(obj.fnc == max(obj.fnc))]  # Set threshold
} else {
    censoring.thr = min.support - 1
}
model.selector[which(mean.vect > censoring.thr)] = 1
length(censoring.thr)

[1] 6

length(mean.vect)

[1] 2981

The error is caused by a length mismatch between mean.vect and censoring.thr. The error message indicates that the comparison between mean.vect (which is a vector with length equal to the number of features) and censoring.thr (which is a scalar) results in a length mismatch during the comparison mean.vect > censoring.thr.

Environment:

R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Looking forward to any suggestions or fixes!

Metadata

Metadata

Assignees

No one assigned

    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