From 66a3500d44222b6185f933333a5414fab52ffe0c Mon Sep 17 00:00:00 2001 From: corentinchoisy Date: Tue, 3 Jun 2025 15:50:13 +0200 Subject: [PATCH] corrected warnings --- R/pcm.R | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) 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)