Skip to content

adjust ID of duplicate NA patterns #107

@benthestatistician

Description

@benthestatistician

One of the tasks of design_matrix() (aka model_matrix()) is to identify terms with common missingness patterns, so as to avoid storing the same information in two places. Some of the operations would be more succinct if they used duplicated.matrix(..., margin=2) to identify replicate columns of the data frame that is cast but not stored here --

null.record <- rowSums(as.data.frame(ccs.by.term))==0

-- rather than applying duplicated.default() to a list. They may well also be more efficient; the duplicated() help page bears a "Warning" reading:

Using this for lists is potentially slow, especially if the
elements are not atomic vectors (see ‘vector’) or differ only in
their attributes. In the worst case it is O(n^2).

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