我需要在生成的html中添加标题,但我不知道这样做。我查看了documentation,但它没有出现在任何选项中。
library(chorddiag)
temp = read.csv("chord_data_pj.csv", sep=",", header=FALSE)
temp1 <- as.matrix(temp)
m <- matrix(c(temp1),nrow = 27, ncol = 27)
paises <- c("AT","BE","BG","BY","CH","CZ","DE","DK","ES","FI","FR","GB","GR","HR","HU","IE","IT","NL","NO","PL","PT","RO","RS","SE","SK","TR","UA")
dimnames(m) <- list(Origen = paises, Destino = paises)
groupColors <- c('#383838','#ffcc00','#124d81','#59b300','#ff4d4d')
chorddiag(m, groupColors = groupColors, groupnamePadding = 40)
谢谢!
答案 0 :(得分:0)
今天在版本3.3.1中,packete“chorddiag”似乎改变了(至少从几个月开始)到“circlize”(就像你展示的文档一样)。 chordDiagram函数可以是“chorddiag”的更新,添加标题可以使用“graphics”包的函数“title”。
library(circlize)
chordDiagram(g, annotationTrack = c("name", "grid"),
annotationTrackHeight = c(0.03, 0.01))
title(main = "title")