Skip to content

Commit

Permalink
Correct bug in pdata.frame in detection of 3rd index variable (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Sep 8, 2023
1 parent f057efc commit f9209b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/tool_pdata.frame.R
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ pdata.frame <- function(x, index = NULL, drop.index = FALSE, row.names = TRUE,
# grouping variable, this should be the third element of the index
# vector or any "group" named element of this vector
group.name <- NULL
if (! is.null(names(index)) || length(index == 3L)){
if (! is.null(names(index)) || length(index) == 3L){
if (! is.null(names(index))){
grouppos <- match("group", names(index))
if (! is.na(grouppos)){
Expand Down

0 comments on commit f9209b5

Please sign in to comment.