我如何在R的networkD3软件包中换行?使用对角线网络时?

时间:2019-02-20 19:09:36

标签: r sankey-diagram networkd3

换行符\n'换行符'似乎不适用于networkD3软件包。也许我没有正确应用\n。使用diagonalNetwork()函数时,如何在下面显示的#2行上换行?

library(networkD3)
nd3 <- list(name = "Start\nSecond Line",  # line 2
            children = list(list(name = "A", 
                                 children = list(list(name = "*1"), 
                                                 list(name = "2"), 
                                                 list(name = "3"))), 
                            list(name = "B")))
diagonalNetwork(List = nd3, fontSize = 18, opacity = 0.9)

enter image description here

0 个答案:

没有答案