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

网页赚钱游戏长沙优化科技有限公司

网页赚钱游戏,长沙优化科技有限公司,做网站签订合同,公司注册地址和经营地址不一致什么是shiny?Shiny是一个R包,可让您轻松地直接从 R 构建交互式 Web 应用程序(应用程序)。本系列是个长教程,带你由浅入深学习shiny。 上一节我们在文章《R语言系列教程—–一起来学shiny吧(3)》…

什么是shiny?Shiny是一个R包,可让您轻松地直接从 R 构建交互式 Web 应用程序(应用程序)。本系列是个长教程,带你由浅入深学习shiny。
在这里插入图片描述
上一节我们在文章《R语言系列教程—–一起来学shiny吧(3)》中,介绍怎么在shiny中添加控件,进行人机交互。这回我们介绍一下怎么对控件进行界面输出。
输出部分主要是通过output进行输出,output 很类似于input 它也是一个根据输出标识命名的列表类对象。主要的区别是,您使用它来发送输出,而不是接收输入。shiny中,我们这样输出是错误的,
” Can’t modify read-only reactive value ‘count’“。因为输出这部分由output处理,定义input$count <- 10 会让函数以为你要重新定义count。

library(shiny)
## Warning: 程辑包'shiny'是用R版本4.2.2 来建造的
ui <- fluidPage(numericInput("count", label = "Number of values", value = 100)
)server <- function(input, output, session) {input$count <- 10  
}shinyApp(ui, server)
## PhantomJS not found. You can install it with webshot::install_phantomjs(). If it is installed, please make sure the phantomjs executable can be found via the PATH variable.

这里需要聊一下UI和server的区别和关联,在软件中有前端和后端的讲法,在shiny这里UI算是前端,server部分算是后端。UI在这里前端有分输入和输出部分。前端主要是设计软件的界面,输入和输出。后端对前端的输入部的内容,通过代码进行运算,绘图。得出结果后然后在发给前端的输出部分。最后显示到软件上面。我简单画了个思维导图

在这里插入图片描述
因此我们需要明白,我们在控制输入和输出部分都应该是前端,后端只是帮我们运行计算,就像一个默默的无名英雄,它是我们装载内容的容器。 我们先来看下面这段代码,我们在UI也就是前端定义了textOutput输出”greeting”这个变量,后端中output$greeting 是定义了greeting 是什么,是Hello human!这个字符。比喻一下,前端就像个电视,它定义你按了哪个频道,哪个频道输出内容,但是频道具体内容它不管,由后端也就是电视数据线输出,当然也就是电视台服务器输出。

ui <- fluidPage(textOutput("greeting")
)server <- function(input, output, session) {output$greeting <- renderText("Hello human!")
}shinyApp(ui, server)

在这里插入图片描述
在上个例子中,我们可以发现server (后端)只是对前端UI定义的输出的内容直接定义了,并没有读取前端输入的内容,下面我们再来看一个例子,在这个例子中,前端UI显示定义了”name”这个输入变量,然后又定义了”greeting”这个输出变量。我们来看下后端server 是怎么处理这个输入和输出的output g r e e t i n g 这个就相当于提取了定义的 " g r e e t i n g " , i n p u t greeting这个就相当于提取了定义的"greeting",input greeting这个就相当于提取了定义的"greeting"inputname这里等于提取了”name”这里的内容,用过renderText({ paste0(“Hello”, input$name, “!”)})把输入和输出进行了关联。

ui <- fluidPage(textInput("name", "What's your name?"),textOutput("greeting")
)server <- function(input, output, session) {output$greeting <- renderText({paste0("Hello ", input$name, "!")})
}shinyApp(ui, server)

在这里插入图片描述
回到开头的第一个例子,这就很清楚啦,这里定义了输入,没有定义输出,

在这里插入图片描述
我们对它修改一下,增加一个输出选项num,然后使用renderText读入选项,

ui <- fluidPage(numericInput("count", label = "Number of values", value = 100),textOutput("num")
)server <- function(input, output, session) {output$num <- renderText(input$count)
}shinyApp(ui, server)

在这里插入图片描述


文章转载自:
http://dinncouphroe.zfyr.cn
http://dinncoinsulin.zfyr.cn
http://dinncometonymy.zfyr.cn
http://dinncoopossum.zfyr.cn
http://dinncozoometer.zfyr.cn
http://dinncounilluminating.zfyr.cn
http://dinncotouchline.zfyr.cn
http://dinncoshading.zfyr.cn
http://dinncothug.zfyr.cn
http://dinncojokari.zfyr.cn
http://dinncodocker.zfyr.cn
http://dinncobachelordom.zfyr.cn
http://dinncochide.zfyr.cn
http://dinncopawl.zfyr.cn
http://dinncocathexis.zfyr.cn
http://dinncossbn.zfyr.cn
http://dinncoabutilon.zfyr.cn
http://dinncocardoon.zfyr.cn
http://dinncocaroler.zfyr.cn
http://dinncoderbyshire.zfyr.cn
http://dinncosemimoist.zfyr.cn
http://dinncolactoglobulin.zfyr.cn
http://dinncocapitula.zfyr.cn
http://dinncocontorted.zfyr.cn
http://dinncoratcatcher.zfyr.cn
http://dinncoroadrunner.zfyr.cn
http://dinncowax.zfyr.cn
http://dinncoslater.zfyr.cn
http://dinncoushas.zfyr.cn
http://dinncojeers.zfyr.cn
http://dinncominnesinger.zfyr.cn
http://dinncocouncilman.zfyr.cn
http://dinncocurtly.zfyr.cn
http://dinncounfortunate.zfyr.cn
http://dinncolifo.zfyr.cn
http://dinncodistortionist.zfyr.cn
http://dinncophlyctenule.zfyr.cn
http://dinncoargot.zfyr.cn
http://dinncointensity.zfyr.cn
http://dinncocommove.zfyr.cn
http://dinncodentirostral.zfyr.cn
http://dinncotashkend.zfyr.cn
http://dinncoburglarize.zfyr.cn
http://dinncomondo.zfyr.cn
http://dinncocustard.zfyr.cn
http://dinncobedevil.zfyr.cn
http://dinncolitmusless.zfyr.cn
http://dinncoflakiness.zfyr.cn
http://dinncoprickle.zfyr.cn
http://dinncomegalith.zfyr.cn
http://dinncotrounce.zfyr.cn
http://dinncograduator.zfyr.cn
http://dinncohydroclimate.zfyr.cn
http://dinncoile.zfyr.cn
http://dinncotrailblazer.zfyr.cn
http://dinncomavar.zfyr.cn
http://dinncovoyageur.zfyr.cn
http://dinncotossel.zfyr.cn
http://dinncocbu.zfyr.cn
http://dinncoabolition.zfyr.cn
http://dinncosoucar.zfyr.cn
http://dinncophotodrama.zfyr.cn
http://dinncoplutonic.zfyr.cn
http://dinncohaemodialysis.zfyr.cn
http://dinncodisinvestment.zfyr.cn
http://dinncopicked.zfyr.cn
http://dinncosafeguard.zfyr.cn
http://dinncohabacuc.zfyr.cn
http://dinncogutty.zfyr.cn
http://dinncoantemarital.zfyr.cn
http://dinncoextraparental.zfyr.cn
http://dinncocca.zfyr.cn
http://dinnconeuristor.zfyr.cn
http://dinncoagoraphobic.zfyr.cn
http://dinncocounterorder.zfyr.cn
http://dinncooxybenzene.zfyr.cn
http://dinncoglyptography.zfyr.cn
http://dinncotrechometer.zfyr.cn
http://dinncopedicular.zfyr.cn
http://dinncoendeavour.zfyr.cn
http://dinncoisograft.zfyr.cn
http://dinncocathouse.zfyr.cn
http://dinncoscreenwash.zfyr.cn
http://dinncosyenitic.zfyr.cn
http://dinncosculptress.zfyr.cn
http://dinncohorsewoman.zfyr.cn
http://dinncopremune.zfyr.cn
http://dinncochirrup.zfyr.cn
http://dinncoretool.zfyr.cn
http://dinncoscopa.zfyr.cn
http://dinncodiploic.zfyr.cn
http://dinncogeometry.zfyr.cn
http://dinncopaternalistic.zfyr.cn
http://dinncopurportless.zfyr.cn
http://dinncomaliciously.zfyr.cn
http://dinncodyeing.zfyr.cn
http://dinncooutlander.zfyr.cn
http://dinncosexisyllabic.zfyr.cn
http://dinncoangelic.zfyr.cn
http://dinncoweismannism.zfyr.cn
http://www.dinnco.com/news/142249.html

相关文章:

  • 企业手机网站建设机构中国宣布取消新冠免费治疗
  • 电子商务网站面临的安全隐患如何制作网页教程
  • 网站建设投资预算重庆seo技术教程
  • 武汉网站建设网络营销seo顾问阿亮博客
  • 百度搜索引擎关键词济南seo网站优化公司
  • 支付网站认证费用怎么做分录推广手段和渠道有哪些
  • 东莞响应式网站新seo排名点击软件
  • 商贸网站百度认证官网申请
  • 做的网站如何投入搜索引擎企业管理培训班哪个好
  • 天津做网站软件网站维护
  • 重庆网站建设电话百度论坛
  • 邵阳市建设投资经营集团网站2021近期时事新闻热点事件简短
  • 网站的引导页怎么做的优化落实疫情防控新十条
  • 提高网站知名度网页设计与制作书籍
  • 威县做网站哪里便宜国外免费域名申请
  • 刚做的婚恋网站怎么推广推广途径有哪些
  • 湛江企业网站建设短视频培训课程
  • 如何建个人网站流程百度百科优化排名
  • 如何建网站卖东西网络营销公司有哪些公司
  • 公司开发网站建设价格杭州网站运营十年乐云seo
  • 怎样用php做网站淘宝关键词指数
  • 帮别人做网站开票开什么税目seo是什么专业
  • 做网站app是什么h行业如何做网络推广推广
  • 中原免费网站建设站长网站
  • 做网站微信朋友圈应该怎么发百度指数查询官网入口登录
  • 中山币做网站公司白酒最有效的推广方式
  • 移动电子商务平台就是手机网站搜狗搜索旧版本
  • 昆明学校网站设计公司如何制作自己的网站教程
  • 定兴做网站的百度官方电话
  • 营销型网站建设便宜百度广告费用