在R中打印没有索引的字符串

mer*_*011 14 r

我已经查看了R中没有行号的打印列表的答案和R中的输出列表索引的预防print(),但似乎都没有阻止R打印索引为左的字符串.

输入:

foo = "10 & 1.832171"    
print(foo, row.names=F, quote=F)  
Run Code Online (Sandbox Code Playgroud)

输出:

[1] 10 & 1.832171
Run Code Online (Sandbox Code Playgroud)

期望的输出:

 10 & 1.832171
Run Code Online (Sandbox Code Playgroud)

这有可能吗?

Das*_*son 23

> foo = "10 & 1.832171"       
> cat(foo)
10 & 1.832171
Run Code Online (Sandbox Code Playgroud)

  • 所以更好的解决方案是:`paste(string_vector, collapse = '\n') %>% cat()`。 (3认同)