当前位置: 首页 > news >正文

广州建设银行分行招聘网站展示型企业网站开发

广州建设银行分行招聘网站,展示型企业网站开发,做优惠券怎么推广引流,可信的网站建设shiny 能快速把R程序以web app的形式提供出来,方便使用,降低技术使用门槛。 本文提供的示例:把空格分隔的txt文件转为逗号分隔的csv文件。 前置依赖:需要有R环境(v4.2.0),安装shiny包(v1.9.1)。括号内是我使用的版本…

shiny 能快速把R程序以web app的形式提供出来,方便使用,降低技术使用门槛。

本文提供的示例:把空格分隔的txt文件转为逗号分隔的csv文件。

前置依赖:需要有R环境(v4.2.0),安装shiny包(v1.9.1)。括号内是我使用的版本。

install.packages(“shiny”)

1.运行与效果

  • 文件名:script/app3/app.R
  • 运行: > shiny::runApp(“script/app3/”)
  • 关闭:关闭浏览器。
  1. 左上角:上传文件,
  2. 右侧:预览效果
  3. 右下角:下载csv文件
    在这里插入图片描述

2.文件内容

script/app3/app.R 如下:

library(shiny)
library(bslib)# Define UI for slider demo app ----
ui <- page_sidebar(# App title ----title = "Blank space txt to csv | v0.0.1",# Sidebar panel for inputs ----sidebar = sidebar(# Input: Select a file ----fileInput("file1","Choose TXT File",multiple = TRUE,accept = c("text/csv","text/comma-separated-values,text/plain","text/blank-separated-values,text/plain",".csv")),tags$hr(),sliderInput("num","show number:",min = 2,max = 1000,value = 10),# Horizontal line ----tags$hr(),# Input: Checkbox if file has header ----checkboxInput("header", "Header", TRUE),# Input: Select separator ----radioButtons("sep","Separator",choices = c(Comma = ",",Semicolon = ";",Blank = " ",Tab = "\t"),selected = " "),# Input: Select quotes ----radioButtons("quote","Quote",choices = c(None = "","Double Quote" = '"',"Single Quote" = "'"),selected = ''),# Horizontal line ----tags$hr(),# Input: Select number of rows to display ----radioButtons("disp","Display",choices = c(Head = "head",All = "all"),selected = "head"),# ButtondownloadButton("downloadData", "Download csv")),# Output: Data file ----tableOutput("contents")
)# Define server logic to read selected file ----
server <- function(input, output) {output$contents <- renderTable({# input$file1 will be NULL initially. After the user selects# and uploads a file, head of that data file by default,# or all rows if selected, will be shown.req(input$file1)df <- read.csv(input$file1$datapath,header = input$header,sep = input$sep,quote = input$quote)if (input$disp == "head") {return(head(df, n=input$num))} else {return(df, n=input$num)}})# Downloadable csv of selected dataset ----output$downloadData <- downloadHandler(filename = function() {req(input$file1)paste(input$file1$datapath, ".csv", sep = "")},content = function(file) {req(input$file1)df <- read.csv(input$file1$datapath,header = input$header,sep = input$sep,quote = input$quote)write.csv(df, file, row.names = FALSE, quote=F)})
}if(0){# show blank separated txt file with headerrunApp("script/app3/")
}# Create Shiny app ----
shinyApp(ui, server)

Ref

  • https://shiny.posit.co/r/getstarted/shiny-basics/lesson1/

End

http://www.yayakq.cn/news/843709/

相关文章:

  • 商丘做网站公司新站seo快速收录网站内容页wordpress的根目录
  • 中国南昌网站建设胶南网站建设哪家好
  • 成都企业网站优化服务wordpress启动广告
  • 最好的做法福州seo网站推广
  • 专业手机网站建设价格php网站开发岗位要求
  • 建外贸网站公司全球十大建筑设计事务所
  • php快速建网站wordpress网站能APP吗
  • 怎么查看网站有没有做推广wordpress设置插件
  • 企业网站升级wordpress添加导航首页
  • 龙山建设集团有限公司网站seo优化方案执行计划
  • 好网站开发培训资源网站如何做
  • 哪家网站建设建立网站心得
  • 做网站网页维护手机App开发课程精品网站开发
  • 网站全能空间阿里云ace搭建wordpress
  • 长春做网站用的软件京津冀协同发展规划纲要全文
  • 沁县网站建设网站优化工具
  • 网站提取规则怎么设置建设宠物食品网站的功能定位
  • 做外汇看哪些网站数据河北邯郸永利ktv视频
  • 做哪个网站的推广最好网站建设按年收费吗
  • 域名cn是个什么网站Wordpress主题 修改 价钱
  • 网站建设与维护就业怎么样水冶那里有做网站的
  • 台州网站建设蓝渊浙江省城乡建设信息港
  • 什邡网站建设公司wordpress里的模板怎么用
  • 网站建设开发合同范本蓝天使网站建设
  • 怎样做投资与理财网站什么是网络营销工程师
  • 深圳 做网站 互联可以做设计私单的网站
  • ps做图 游戏下载网站有哪些有特效的网站
  • 网页设计与网站建设心得体会有趣又有深意的广告
  • 微信做自己的网站导入到wordpress
  • 美术对网站开发有用吗企业网站建设范文