gallerier:Shiny和RMarkdown的图像画廊

  • a0_137511
    了解作者
  • 30.5MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-13 12:43
    上传日期
画廊 画廊的目标是提供一种在Shiny Applications中包含图像画廊的简单方法。 最初,这只是一个包含一些示例代码的。 简单的lightbox和光photoswipe廊可作为功能和闪亮的模块使用。 可以在inst文件夹中找到Evample应用程序,而上提供了实时版本。 该软件包正在大力开发中。 lightbox画廊已完全正常运行,但photoswipe无法按预期工作。 安装 您可以使用以下方法从安装最新版本的 : devtools :: install_github( ' mrjoh3/gallerier) 例子 这是一个基本示例,向您展示如何解决一个常见问题: library( gallerier ) images <- data.frame ( src = list.files( ' www/img ' )) % > % tidyr :: separate( co
gallerier-master.zip
内容介绍
# gallerier <!-- badges: start --> [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) <!-- badges: end --> The goal of gallerier is to provide a simple way to include image galleries in Shiny Applications. Initialy this was just a [repository](https://github.com/mrjoh3/shiny-gallery-example) with some example code. Simple `lightbox` and `photoswipe` galleries are available as functions and shiny modules. Evample applications can be found in the `inst` folder and a live version is available on [shinyapps](https://mrjoh3.shinyapps.io/shiny-gallery-example/). The package is under heavy development. The `lightbox` gallery is fully functional but `photoswipe` does not yet work as expected. ## Installation You can install the latest version of gallerier from [Github](https://github.com/mrjoh3/gallerier) with: ``` r devtools::install_github('mrjoh3/gallerier) ``` ## Example This is a basic example which shows you how to solve a common problem: ``` r library(gallerier) images <- data.frame(src = list.files('www/img')) %>% tidyr::separate(col = 'src', c('txt', 'date', 'time', 'msec'), sep = '_|\\.', remove = FALSE) %>% rowwise() %>% mutate(date = lubridate::ymd(date), key = hashids::encode(1e3 + as.integer(msec), hashid_settings(salt = 'this is my salt'))) ## simple lightbox lightbox_gallery(images[sample(1:nrow(images), 12, replace = FALSE),], 'gallery', display = TRUE) ```
评论
    相关推荐