[英]could not find function “hc_add_series_density” Highcharter R
I'm using Highcharter version 0.6.0 (R) 我正在使用Highcharter版本0.6.0(R)
I need to build density plots and each plot needs to have multiple series. 我需要建立密度图,每个图都需要有多个序列。 I looked up online and came across hc_add_series_density by Nuno Agostinho.
我在网上查找并遇到了Nuno Agostinho的hc_add_series_density。
I tried using it in the code below but i get the error - "could not find function "hc_add_series_density"" 我尝试在下面的代码中使用它,但出现错误-“找不到函数“ hc_add_series_density””
library(highcharter)
library(magrittr)
set.seed(1)
x <- rbeta(300, 0.2, 4)
y <- rbeta(300, 0.5, 4)
hcdensity(x, area = TRUE) %>%
hc_add_series_density(y, area = TRUE)
Is it not there in version 0.6.0 ? 版本0.6.0中不存在吗? If not, how can I achieve density plots with multiple series ?
如果没有,如何获得多个序列的密度图?
Thank You 谢谢
There's no function hc_add_series_density
, there's a method hc_add_series.density
, but you usually wouldn't call it directly. 没有函数
hc_add_series_density
,有一个方法hc_add_series.density
,但是您通常不会直接调用它。 Instead, you'd just call hc_add_series
on a density
object, and the appropriate method will be called, eg: 相反,您只需要在一个
density
对象上调用hc_add_series
,就会调用适当的方法,例如:
hcdensity(x, area = TRUE) %>%
hc_add_series(density(y), area = TRUE)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.