小编Ser*_*ych的帖子

bquote在ggplot2版本2.1中的facet_grid标签中不起作用

我有以下代码在ggplot2的一些旧2.1版之前的版本中完美运行:

dd <-
structure(list(Dataset = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = c("train", 
"validation"), class = "factor"), Iterations = c(4L, 2L, 3L, 
4L, 1L, 3L), L1 = c(1e-07, 1e-07, 1e-07, 1e-06, 1e-07, 1e-06), 
    L2 = c(1e-05, 1e-05, 1e-05, 1e-05, 1e-05, 1e-05), Accuracy = c(0.2079478, 
    0.2079829, 0.2081201, 0.2086698, 0.2091378, 0.2093453), Loss = c(0.4468469, 
    0.446877, 0.4472973, 0.4485992, 0.4496757, 0.4499354)), .Names = c("Dataset", 
"Iterations", "L1", "L2", "Accuracy", "Loss"), row.names = c(NA, 
6L), class = "data.frame")

labelAxis <- function(i) {
  function(values) {
    sapply(values, …
Run Code Online (Sandbox Code Playgroud)

r ggplot2

5
推荐指数
1
解决办法
249
查看次数

ggplot stacked bar plot from 2 separate data frames

I have been struggling with this conundrum all day and getting close, but no cigar. I have two data frames which are the results of two separate socio-economic surveys from two districts within a city. I want to compare columns from these data frames side by side in a bar plot to show the frequencies (counts) of responses to a particular question across both surveys.

The questions asked in each survey were identical. However, they were coded slightly differently and …

r bar-chart ggplot2

4
推荐指数
1
解决办法
3637
查看次数

标签 统计

ggplot2 ×2

r ×2

bar-chart ×1