seqdplot 中的 x 轴标签
x-axis label in seqdplot
当我在序列分析中使用 TraMinR 包中的 seqdplot() 按时间点绘制状态分布时,我在标记 x 轴时遇到了问题。标签与其他绘图函数一起使用,例如 seqiplot
。我可以稍后用 title(xlab="")
标记 x 轴但是我不知道当我的序列被分组时它是如何工作的,例如按性别。我是否缺少使 seqdplot 函数特别的东西?谢谢你的帮助!
这是一个例子
library(TraMineR)
data(mvad)
mvad.labels <- c("employment", "further education", "higher education",
"joblessness", "school", "training")
mvad.scodes <- c("EM","FE","HE","JL","SC","TR")
mvad.seq <- seqdef(mvad, 15:86, states=mvad.scodes, labels=mvad.labels)
# Index plot: labelling works
seqiplot(mvad.seq, with.legend=F, xlab="time")
# State Distribution Plot: labelling doesn't work
seqdplot(mvad.seq, with.legend=F, xlab="time")
这实际上是一个错误。 seqdplot
调用的绘图方法 plot.stslist.statd
忽略了 xlab
参数。
该错误已在 R-Forge 上可用的开发版本 2.3-1 中修复。此开发版本最终将成为 CRAN 上的 TraMineR 2.2.1。
关于分组机制:TraMineR使用layout
来组织分组。要将 title(xlab="time")
与分组一起使用,您必须手动创建分组图,这可能很挑剔。
当我在序列分析中使用 TraMinR 包中的 seqdplot() 按时间点绘制状态分布时,我在标记 x 轴时遇到了问题。标签与其他绘图函数一起使用,例如 seqiplot
。我可以稍后用 title(xlab="")
标记 x 轴但是我不知道当我的序列被分组时它是如何工作的,例如按性别。我是否缺少使 seqdplot 函数特别的东西?谢谢你的帮助!
这是一个例子
library(TraMineR)
data(mvad)
mvad.labels <- c("employment", "further education", "higher education",
"joblessness", "school", "training")
mvad.scodes <- c("EM","FE","HE","JL","SC","TR")
mvad.seq <- seqdef(mvad, 15:86, states=mvad.scodes, labels=mvad.labels)
# Index plot: labelling works
seqiplot(mvad.seq, with.legend=F, xlab="time")
# State Distribution Plot: labelling doesn't work
seqdplot(mvad.seq, with.legend=F, xlab="time")
这实际上是一个错误。 seqdplot
调用的绘图方法 plot.stslist.statd
忽略了 xlab
参数。
该错误已在 R-Forge 上可用的开发版本 2.3-1 中修复。此开发版本最终将成为 CRAN 上的 TraMineR 2.2.1。
关于分组机制:TraMineR使用layout
来组织分组。要将 title(xlab="time")
与分组一起使用,您必须手动创建分组图,这可能很挑剔。