Skip to content

Selecting single column NPDE causes results to be dropped #4

@CSJCampbell

Description

@CSJCampbell

When tabCol is single value in ncappc, nca.npde drops columns, resulting in only first record from being retained.

At ~line 18, replace npde[, pdecol] with npde[, pdecol, drop = FALSE] in call to lapply.

# basic case
# 0, -0.841621233572914, -0.2533471031358, 
#  0.2533471031358, 0.841621233572914, 0)
res <- nca.npde(pdedata = data.frame(A = (0:5)/5, B = 1), pdecol = c("A", "B"))
res$npdeA
# [1]  0.0000000 -0.8416212 -0.2533471  0.2533471  0.8416212  0.0000000

# single column
res <- nca.npde(pdedata = data.frame(ID = 1, A = (0:5)/5), pdecol = "A")
res$npdeA
# [1] 0 0 0 0 0 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions