Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在R中的粘贴功能中加粗文本并使用字体_R_Text_Fonts_Shiny - Fatal编程技术网

如何在R中的粘贴功能中加粗文本并使用字体

如何在R中的粘贴功能中加粗文本并使用字体,r,text,fonts,shiny,R,Text,Fonts,Shiny,我想使用粘贴功能加粗文本。如何在R中编写此代码?谢谢你调查这件事 observeEvent(input$submit3,{ if (input$submit3==0) return() tagList( lapply(1:input$numoftrends, function(j) { trend.period <- input[[paste0("trendDateRange", j)]] trend1 <- substr(trend.period[1],1,

我想使用粘贴功能加粗文本。如何在R中编写此代码?谢谢你调查这件事

observeEvent(input$submit3,{

if (input$submit3==0) return()

tagList(
  lapply(1:input$numoftrends, function(j) {
    trend.period <- input[[paste0("trendDateRange", j)]]
    trend1 <- substr(trend.period[1],1,7)
    trend2 <- substr(trend.period[2],1,7)

    output[[paste0('Text', j)]] <- renderText({
      #paste(" ")  ## add space in between text
      paste('Trend Date Range', j, ': ', trend1 ,' - ', trend2)
    })
  })
  )
})
observeEvent(输入$submit3{
如果(输入$submit3==0)返回()
标签列表(
lappy(1:输入$numoftrends,函数(j){

trend.period用
括起文本,并使用
htmlOutput

library("shiny")
server <-function(input, output) {
  output$text <- renderText({
    paste('<B>Trend Date Range</B>')
  })
}

ui <-fluidPage( htmlOutput("text"))

runApp(list(ui = ui, server = server))
库(“闪亮”)

服务器尝试在你想要加粗的内容之前粘贴一个
,在你想要加粗的内容之后粘贴一个
。谢谢你花时间来研究这个问题。正如你在我的代码中看到的,我正在使用一个lapply打印一些文本。现在我如何将它放在htmlOutput的fluidPage中。我很抱歉,我对R和shiny都是新手。祝你有美好的一天!请不要担心。我知道了。谢谢。对不起,这段代码怎么样。我怎么加粗?粘贴('Trend Date Range',j',:',trend1',-',trend2)我想加粗代码中的所有文本。
paste('Trend Date Range',j',:',trend1',-',trend2',)