I simply want to read a file and output it in the console. print( readLines(...) ) is the best I开发者_运维技巧 can do so far, but I don't want a line-by-line identifier, I just want the file as-is.
Use writeLines instead of print. The default con for writeLines is stdout(), so writeLines(readLines(...)) sounds right. 
See ?writeLines. 
You could use system to call a system command.
system("cat yourfile.txt")
You have to specify a length (which can be too big), but maybe readChar would help:
cat(readChar(filename, 1e5))
I don't know exactly what you mean, but ?cat may be what you are looking for.
Here's an elegant way using dplyr
library(dplyr)
readLines("init.R") %>% paste0(collapse="\n") %>% cat
or with base R
cat(paste0(readLines("init.R"), collapse="\n"))
remember to replace init.R with the file path myfolder/myfile.R
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论