Last chance! 50% off unlimited learning
Sale ends in
The argument indicates either a file name or a vector of character strings, one string for each line of the output of ms. As with the second case, it is appropriate with system(,intern=TRUE), see example below.
read.ms.output(msout,is.file=TRUE,xpose=TRUE,verbose=TRUE,
outfile=NULL,outfileonly=FALSE)
Press WH, SA Teukolsky, WT Vetterling, BP Flannery (1992). Numerical Recipes in C. Cambridge University Press, Cambridge.
# Assuming ms is on the path
system("ms 5 4 -s 5 > ms.out")
msout1 <- read.ms.output("ms.out")
system("ms 50 4 -s 5 > ms.out")
msout2 <- read.ms.output("ms.out",outfile="out",outfileonly=TRUE)
msout <- system("ms 5 4 -s 5 -L", intern=TRUE)
msout3 <- read.ms.output(msout,FALSE)
Run the code above in your browser using DataLab