Rev 7865 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% This file is part of the 'foreign' package for R% It is distributed under the GPL version 2 or later% Original copyright (c) 2004 Stephen Eglen% Changes copyright (c) 2004-10 R Development Core Team\name{read.octave}\alias{read.octave}\title{Read Octave Text Data Files}\description{Read a file in Octave text data format into a list.}\usage{read.octave(file)}\arguments{\item{file}{a character string with the name of the file to read.}}\details{This function is used to read in files in Octave text data format, ascreated by \code{save -text} in Octave. It knows about most of thecommon types of variables, including the standard atomic (real andcomplex scalars, matrices, and \eqn{N}-d arrays, strings, ranges, andboolean scalars and matrices) and recursive (structs, cells, andlists) ones, but has no guarantee to read all types. If a type is notrecognized, a warning indicating the unknown type is issued, it isattempted to skip the unknown entry, and \code{NULL} is used as itsvalue. Note that this will give incorrect results, and maybe evenerrors, in the case of unknown recursive data types.As Octave can read MATLAB binary files, one can make the contents ofsuch files available to R by using Octave's load and save (as text)facilities as an intermediary step.}\value{A list with one named component for each variable in the file.}\references{\url{https://octave.org/}}\author{Stephen Eglen \email{stephen@gnu.org} and Kurt Hornik}\keyword{file}