R 如何在“kml”包中显示属于群集的轨迹?

R 如何在“kml”包中显示属于群集的轨迹?,r,ggplot2,cluster-analysis,k-means,longitudinal,R,Ggplot2,Cluster Analysis,K Means,Longitudinal,kml包实现。集群工作得很好 现在我想知道如何显示集群的“结构”,例如,通过给它们着色 文档中的一个最简单的示例(clusterLongData函数的帮助文件) 库(kml) traj justplot(myCld,2,parTraj=parTraj(col=“clusters”),toPlot=“traj”)(参见:?“plot,ClusterLongData,ANY method”)@cartlefish44:thx,就是这样。justplot(myCld,2,parTraj=parTraj

kml
包实现。集群工作得很好

现在我想知道如何显示集群的“结构”,例如,通过给它们着色

文档中的一个最简单的示例(clusterLongData函数的帮助文件)

库(kml)

traj just
plot(myCld,2,parTraj=parTraj(col=“clusters”),toPlot=“traj”)
(参见:
?“plot,ClusterLongData,ANY method”
)@cartlefish44:thx,就是这样。just
plot(myCld,2,parTraj=parTraj(col=“clusters”),toPlot=“traj”)
(参见:
?“plot,ClusterLongData,ANY method”
)@cartlefish44:thx,就是这样。
library(kml)

traj <- matrix(c(1,2,3,1,4, 3,6,1,8,10, 1,2,1,3,2, 4,2,5,6,3, 4,3,4,4,4, 7,6,5,5,4),6)

myCld <- clusterLongData(
  traj=traj,
  idAll=as.character(c(100,102,103,109,115,123)),
  time=c(1,2,4,8,15),
  varNames="P",
  maxNA=3
)

kml(myCld, 2, toPlot = 'both')