我有一个字符串,例如:
SomeName SomeValue
A much longer name AnotherValue
Even longer name than before NewValue
假设我已经正确将这个文本存储在一个 R 变量中,如下所示:
variable<-"SomeName SomeValue<br\>A much longer name AnotherValue<br\>Even longer name than before NewValue<br\>
在我的ui.R文件中:
...htmlOutput("TextTable")
在我的 server.R 文件中
output$TextTable<- renderUI({
HTML(variable)
})
但输出结果不符合我的要求。除一个空格外,所有的空格都被删除了。因此,在我的输出中,“列”不如预期。我该如何避免这种情况?
HTML
函数是做什么的?它可能会去除空格吗? - Roman Luštrik