相关疑难解决方法(0)

表达式()中的换行符?

我在R中有以下直方图:

hist(alpha,cex.main=2,cex.axis=1.2,cex.lab=1.2,
main=expression(paste("Histogram of ",hat(mu), ", Bootstrap samples, Allianz")))
Run Code Online (Sandbox Code Playgroud)

标题太长了,所以我想换线.根据这个线程,我试过

hist(alpha,cex.main=2,cex.axis=1.2,cex.lab=1.2,
main=expression(paste("Histogram of ",hat(mu), ",cat("\n") Bootstrap samples, Allianz")))
Run Code Online (Sandbox Code Playgroud)

要么

hist(alpha,cex.main=2,cex.axis=1.2,cex.lab=1.2,
main=expression(paste("Histogram of ",hat(mu), cat("\n"),", Bootstrap samples, Allianz")))
Run Code Online (Sandbox Code Playgroud)

但两者都不起作用,我怎样才能在paste()中获得换行符?

plot r line-breaks title plotmath

39
推荐指数
2
解决办法
2万
查看次数

标签 统计

line-breaks ×1

plot ×1

plotmath ×1

r ×1

title ×1