Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting single column NPDE causes results to be dropped #4

Open
CSJCampbell opened this issue Nov 13, 2017 · 0 comments
Open

Selecting single column NPDE causes results to be dropped #4

CSJCampbell opened this issue Nov 13, 2017 · 0 comments

Comments

@CSJCampbell
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant