我有一个样本数据:“二”数据集的样本数据
one <- data.frame(
Timestamp = seq(from = as.POSIXct("2023-07-01"), by = "days", length.out = 5),
`Heat Capacity` = c(10, 15, 8, 12, 20)
)
two <- data.frame(
Timestamp = seq(from = as.POSIXct("2023-07-01"), by = "days", length.out = 3),
`Heat Capacity` = c(8, 12, 6)
)
字符串
如果不合并两个 Dataframe ,可以使用echarts4r形成折线图。
我使用ggplot:
one_graph <- ggplot() +
geom_line(data = one, aes(x = one[[1]], y = one[[2]])) +
geom_line(data = two, aes(x = two[[1]], y = two[[2]]))
型
使用echarts4r
可以实现同样的功能吗
1条答案
按热度按时间3ks5zfa01#
这是可能的:
字符串
的数据