diff --git a/R/pcm.R b/R/pcm.R index c65e62b..97b6aa8 100644 --- a/R/pcm.R +++ b/R/pcm.R @@ -43,11 +43,13 @@ pcm <- function(df=NULL,items=NULL,grp=NULL,dif.items=NULL,type.dif=NULL,weights if (!("id"%in%colnames(df))) { stop('ERROR: no column named id provided') } - if (!is.null(grp) & any(apply(df[df[,grp]==0,items],2,max)