基于R语言的shiny网页工具开发小技巧系列-02
六年前还在上海工作的时候,机缘巧合接触了使用R语言的shiny体系搭建网页工具的技术,就一直身体力行的在我们生物信息学圈子里面推广它。
自己一个人能做的很有限,很庆幸这些年有各式各样的小伙伴加入我们《生信技能树》小圈子,一起建设shiny知识体系。最近有空,就安排实习生整理了一下我们的生信技能树论坛上面的shiny板块的一些笔记:
显示一个有图片的列表用:sanitize.text.function = function(x) x
示例如下:
显示一个有图片的列表用:sanitize.text.function = function(x) x 示例如下:
library(shiny)
ui <- (tableOutput('mytable'))
server <- function(input, output) {
output$mytable <- renderTable({
dat <- data.frame(
omic = c('genomic', 'transcriptomic'),
flag = c('<img src="https://biotrainee.com/data/attachment/common/6c/common_45_icon.png"></img>',
'<img src="https://biotrainee.com/data/attachment/common/d9/common_46_icon.jpg"></img>')
)
dat
}, sanitize.text.function = function(x) x)
}
shinyApp(ui, server)

sanitize.text.function = function(x) x的意义是什么?看看去掉之后有什么变化
library(shiny)
ui <- (tableOutput('mytable'))
server <- function(input, output) {
output$mytable <- renderTable({
dat <- data.frame(
omic = c('genomic', 'transcriptomic'),
flag = c('<img src="https://biotrainee.com/data/attachment/common/6c/common_45_icon.png"></img>',
'<img src="https://biotrainee.com/data/attachment/common/d9/common_46_icon.jpg"></img>')
)
dat
}),
}
shinyApp(ui, server)

生信技能树论坛-shiny社区版块
更多资料,都在shiny社区,链接:http://www.biotrainee.com/forum-149-3.html

生信技能树
把你的shiny网页工具部署在云服务器 手把手教你使用shiny创建一个网页工具(基于Windows) Shiny app开发, AWS上部署Shiny app,绑定域名 ID转换大全 在ubuntu20上面安装R4
生信菜鸟团
生信技能树论坛-生信社区版块-bioconductor中文&shiny交互网页 我的 Shiny 入门学习笔记 给你的 R Shiny debug 必看指南 Shiny, 照亮你的美 bs4Dash | Shiny 仪表盘框架 盘点 Shiny 中的各种主题和 UI 插件 Shinyforms | 用 Shiny 写一个信息收集表
