小编Tim*_*orz的帖子

ggplots geom_tile 中的圆角可能吗?

是否可以为ggplot2geom_tile图层中的图块制作圆角?

带标准边缘的示例:

df <- data.frame(
    x = rep(seq(2, 15, 6.5), 2),
    y = c(rep(6.5, 3), rep(2,3)),
    h = rep(4.25, 6),
    w = rep(6.25, 6), 
    info= rep("boring\ntiles", 6),
    color = factor(c(rep(1,3), rep(2,3)))
)

ggplot(df, aes(x, y, height = h, width = w, label = info)) +
    geom_tile(aes(fill = color), alpha=0.83) +
    geom_text(color = "white", fontface = "bold", size = 8,
              aes(label = info, x = x - 2.9, y = y - 1), hjust = 0)
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

r ggplot2 tidyverse

8
推荐指数
1
解决办法
1148
查看次数

如何使用 golem 在 Flexdashboard 包装器中制作 dockerized Shiny 应用程序?

是否可以使用 Flexdashboard 作为 Open Analytics golem 包的一个包来制作一个闪亮的应用程序?之后可以dockerize吗?flexdashboard .Rmd 文件的工作流程如何?

到目前为止我的 Dockerfile

FROM rocker/shiny-verse:latest 

MAINTAINER Tim M.Schendzielorz "tim.schendzielorz@googlemail.com"

# Install dependencies 

RUN  echo 'install.packages(c("dplyr","dbplyr","DBI","DT","plotly","flexdashboard","lubridate"), \
        repos="http://cran.us.r-project.org", \
        dependencies=TRUE)' > /tmp/packages.R \
        && Rscript /tmp/packages.R


# Copy configuration files into the Docker image
COPY shiny-server.conf  /usr/bin/shiny-server.conf
COPY shiny-server.sh  /usr/bin/shiny-server.sh

COPY flexdashboard.Rmd /usr/bin/flexdashboard.Rmd   

# make all app files readable (solves issue when dev in Windows, but building in Ubuntu)
RUN chmod -R 755 /usr/bin

# Add shiny user
RUN groupadd  user \
&& …
Run Code Online (Sandbox Code Playgroud)

r shiny docker dockerfile flexdashboard

2
推荐指数
1
解决办法
915
查看次数

标签 统计

r ×2

docker ×1

dockerfile ×1

flexdashboard ×1

ggplot2 ×1

shiny ×1

tidyverse ×1