Friday, 7 August 2015

R : Display contents of a file to console


You can use “system("cat fileName")”, to get the contents of a file.

> system("cat out.R")
structure(list(id = 1:4, firstName = structure(1:4, .Label = c("Hari Krishna",
"Joel", "Rama Krishna", "Sudheer"), class = "factor")), .Names = c("id",
"firstName"), row.names = c(NA, -4L), class = "data.frame")


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment