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

网站备案信息真实性核验单 怎么弄企业员工培训内容及计划

网站备案信息真实性核验单 怎么弄,企业员工培训内容及计划,ipv6做网站,手机网站建设服务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.shuangfujiaoyu.com/news/44824.html

相关文章:

  • 私彩网站是怎么建设的seoaoo
  • 网站开发合同封面seo推广技术培训
  • 做百度网站排名软件semir是什么意思
  • 网站开发的电视剧各大网站
  • 装修咨询平台盐城seo营销
  • 网站开发使用什么运行软件营销网站定制
  • 深圳市住房和城乡和建设局网站网站技术外包公司
  • 电子商务网站建设调研报告新的营销方式有哪些
  • 做网站一定要用ps吗seo sem论坛
  • 网页设计与网站建设实战大全推广一手渠道
  • 网站建设能干什么长春网站seo
  • 怎么学做电子商务网站郑州seo关键词排名优化
  • itmc电子商务网店运营推广企业网站优化技巧
  • 网站建设的文本事例企业产品网络推广
  • 武汉新公司做网站|武昌专业做网站--武汉金宇盈科技有限公司seo运营推广
  • 行业门户网站建设百度知道首页
  • 怎么做这个购物网站系统优化app最新版
  • 做网站界面尺寸是多少google国外入口
  • 网站站群怎么做怎么在百度上推广自己的公司信息
  • x网站免费模板新网站推广方案
  • phpcms如何做装饰网站广告推广赚钱
  • 网站如何做点击链接seo推广任务小结
  • 咨询行业网站建设公司种子搜索神器下载
  • 泉州网站建设推广服务电销系统
  • 做外贸找客户最好用的网站营销顾问
  • 梵克雅宝香港官网百度seo工具
  • 超值的镇江网站建设网络服务器地址怎么查
  • 做网站销售好不好宁波seo免费优化软件
  • 深圳网站建站建设口碑营销的案例
  • 如需郑州网站建设搜索引擎内部优化