Skip to content

Function diag results in error when subsetting #42

@v-hol

Description

@v-hol

Any attempt to subset a matrix using diag gives the error "replacement diagonal has the wrong length."
Investigating with breakpoints shows that the error occurs in Rsh_SetterCall, specifically the Rf_applyClosure call in the CLOSXP case.
When cating the value without setting it, the value shows without issue.
Test to reproduce error:

    x <- matrix(4,2,2)
    diag(x)[2] <- 5

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