I am reading a file where in each line there are numbers separated by spaces.
I am using following command
f <- file("stdin")
on.exit(close(f))
L <- strsplit(readLines(f), "\n")
T1 <- as.numeric(unlist(strsplit(L[[1]], split = "\\s"))) # to read line containing numbers separated by spaces.
Is there any optimal way to do without using any external libraries ?