“El cálculo falló en `stat_flow ()`:” Código de respuesta

El cálculo falló en `stat_flow ()`:

ggplot(df_data_Aluv,
           aes(x = month, 
               stratum = Job, 
               alluvium = Employee,
               y = freq,
               fill = Job, 
               label = Job)) +
        scale_x_discrete(expand = c(.1, .1)) +
        geom_flow(stat = "alluvium", 
                  lode.guidance = "frontback",
                  color = "darkgray") +
        geom_stratum(alpha = .5) +
        geom_text(stat = "stratum", size = 3) +
        theme(legend.position = "bottom") +
        ggtitle("Project month responses at three points in time")
MF

El cálculo falló en `stat_flow ()`:

    df_data_Aluv <- data %>%
        filter(PostDate >= "2019-08-01" & PostDate <= "2019-10-30") %>%
        select(date = PostDate, Employee, Job, Hours) %>%
        group_by(Job, month = as.character(floor_date(date, "month")), Employee) %>%
        summarize(freq = n_distinct(Employee), Hours = sum(Hours)) %>%
        mutate(empmon = paste(Employee, " -- ", month)) %>%
        group_by(empmon) %>%
        filter(Hours == max(Hours)) %>%
        distinct(empmon, .keep_all = TRUE)  
MF

Respuestas similares a “El cálculo falló en `stat_flow ()`:”

Preguntas similares a “El cálculo falló en `stat_flow ()`:”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código