read.table with a "memory connection"
On 01/04/2015 09:52, Thomas wrote:
Hi, Is there a way to create "memory connections" in R which are valid connections to read.table (and associated function)? By saying "memory connection" I refer to something like a connection created from a simple character object (of length 1) - instead of having the content in a physical file just have it in an ordinary R object. More or less the equivalent to the std::istringstream class in C++.
I believe you are looking for 'text connections': see the 'text' argument to read.table() and ?textConnection.
Brian D. Ripley, ripley at stats.ox.ac.uk Emeritus Professor of Applied Statistics, University of Oxford 1 South Parks Road, Oxford OX1 3TG, UK