调用 seqdef 时忽略输出
Omit output when calling seqdef
不知是否可以省略TraMineR
的函数seqdef
的输出。我没有看到任何 verbose
参数或类似参数。
谢谢!
维克多
您的意思可能是禁止显示消息。因此,只需使用 suppressMessages(seqdef(...))
,如下例所示。请注意,suppressMessages
是基本 R 函数,可以与其他函数一起使用,例如 seqdist
或 seqrep
.
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))
不知是否可以省略TraMineR
的函数seqdef
的输出。我没有看到任何 verbose
参数或类似参数。
谢谢! 维克多
您的意思可能是禁止显示消息。因此,只需使用 suppressMessages(seqdef(...))
,如下例所示。请注意,suppressMessages
是基本 R 函数,可以与其他函数一起使用,例如 seqdist
或 seqrep
.
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))