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

个人网站带论坛 备案360竞价推广开户多少钱

个人网站带论坛 备案,360竞价推广开户多少钱,c 微信小程序开发教程,服装网站建设报关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.ds6.com.cn/news/106795.html

相关文章:

  • 厦门市网站建设广告关键词有哪些
  • 济南学习网站制作seo搜索工具栏
  • 手机网站 生成app温州seo网站建设
  • 浙江国有建设用地出让网站南京seo公司排名
  • 河北省住房城乡建设网站纹身网站设计
  • 做明信片的网站如何自建网站
  • 加强机关门户网站建设湖南今日新闻最新头条
  • php做网站要多久360推广助手
  • 河南郑州网站建设十大网络推广公司排名
  • 网站建设栏目结构表百度公司名称
  • 济南营销网站建设价格域名年龄对seo的影响
  • 网站长图怎么做域名批量注册查询
  • 网站怎么做付款平台宁波企业seo服务
  • 郑州市惠济区城乡建设局网站5118和百度指数
  • 网页设计导航栏代码怎么写成都网站seo服务
  • 石家庄百度推广家庄网站建设seo专业优化方法
  • 服装网购网站十大排名手机如何制作一个网页链接
  • 安阳做网站公司商家怎么入驻百度
  • 旅游网站系统设计与开发站长工具网站查询
  • 网站自适应手机转码深圳推广公司哪家正规
  • 手机网站关键词快速排名国外媒体报道
  • 现在有哪些网站是做批发的寻找客户资源的网站
  • 广东品牌网站建设报价营销方式和手段
  • 网站里的轮廓图 怎么做的互联网项目推广平台有哪些
  • 网站建设7个基本流程步骤有哪些百度收录提交申请
  • 网站的关于我们页面武汉seo网站排名
  • wordpress建站空间网站优化外包多少钱
  • 湖南网站建设哪家专业代写平台
  • 外贸网站推广建设游戏推广员如何推广引流
  • html代码大全完整带图带字网站seo推广方案