首页 > 解决方案 > Omit output when calling seqdef

问题描述

I wonder if it is possible to omit the output of the function seqdef of TraMineR. I do not see any verbose argument or similar.

Thank you! Víctor

标签: traminer

解决方案


您可能的意思是压制消息。所以只需suppressMessages(seqdef(...))像下面的例子一样使用。请注意,这suppressMessages是一个基本 R 函数,可以与其他函数一起使用,例如seqdistseqrep

library(TraMineR)
data(biofam)
biofam.lab <- c("Parent", "Left", "Married", "Left+Marr",
                "Child", "Left+Child", "Left+Marr+Child", "Divorced")
biofam.short <- c("P","L","M","LM","C","LC","LMC","D")
biofam.seq <- suppressMessages(seqdef(biofam[,10:25], alphabet=0:7, 
                     states=biofam.short, labels=biofam.lab))

推荐阅读