当前位置: 首页 > 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.shuangfujiaoyu.com/news/16702.html

相关文章:

  • 郑州制作网站百度seo网站优化
  • 厦门做网站建设互联网营销培训
  • 网站如何做渗透测试工具推广的软件
  • 广州网站制作联系方式网站流量
  • 池州哪里做网站网站怎么优化推荐
  • 网站设计师需要学什么最新推广赚钱的app
  • 沈阳网站建设首选龙兴科技网站推广方案范例
  • 谷歌网站收录入口宁波seo优化服务
  • 免费cms建站系统有哪些免费做网站的平台
  • 网站 维护 页面南宁seo推广优化
  • 手机网站对企业用户的好处百度推广代理公司
  • 中文域名做的网站中国国家培训网
  • 广东有做阿里网站的吗站长seo工具
  • 网站开发案例教堂html人工智能培训班收费标准
  • 统计局网站建设情况网站推广计划书
  • 建什么网站好今日头条军事新闻
  • 最好的营销型网站案例免费推广引流平台
  • 个人站长做哪些网站好深圳竞价托管
  • 做网站开通手机验证功能百度最新秒收录方法2023
  • 什么类型的网站流量高全专业优化公司
  • wordpress漫画站主题seo排名查询工具
  • 日本网站制作微信朋友圈营销方案
  • 摄影网站首页设计整站多关键词优化
  • 杭州做网站哪家公司好近期国内新闻
  • 什么网站是solr做的百度开放平台
  • 免费网站一键生成怎样做品牌推广
  • 网站一条龙服务学企业管理培训班
  • 网站建设中是因为没有ftp上传吗seo视频教程我要自学网
  • 东西湖网站建设公司windows清理优化大师
  • 个人做免费的网站站长工具端口检测