Skip to content

batch_sil with non-numeric batch codes #76

@jesswhitts

Description

@jesswhitts

Hello,

I get the following error when running batch_sil:

R[write to console]: Error in if (!all(x == round(x))) stop("'x' must only have integer codes") :
missing value where TRUE/FALSE needed

R[write to console]: In addition:
R[write to console]: Warning message:

R[write to console]: In silhouette(as.numeric(batch), dd) :
R[write to console]: NAs introduced by coercion

The problem comes from having non-numeric batch codes, which this line of code converts to NAs:
summary(silhouette(as.numeric(batch), dd))

Can you suggest any workaround for this?

Many thanks,
Jess

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