Skip to content

Error in R_ldsc() when N contains only integers #6

@balr411

Description

@balr411

When the vector N passed to R_ldsc contains only integers (i.e. class(N) == "integer"), the function fails due to the following code snippet:

if("matrix" %in% class(N)){ stopifnot(nrow(N) == J & ncol(N) == M) }else if(class(N) == "numeric"){ stopifnot(length(N) == M) N <- matrix(rep(N, each = J), nrow = J) }

N remains a vector instead of a matrix, which causes the following error:

Error in map2():
In index: 1.
Caused by error in N[ix, i]:
! incorrect number of dimensions

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