Learn R Programming

RcppOctave (version 0.9.5)

mfiles: M Files

Description

mfiles converts source code or .m filenames into real paths to .m files that can be sourced with o_source.

Usage

mfiles(..., pattern = "mfile_", dir = tempdir())

Arguments

...
specification of a .m files as character arguments. The elements of the vector can be either file paths or plain Octave/Matlab code, which are then written to disk in -- temporary -- .m files. Note that the paths do not need to correspond to exist
dir
existing directory where to write the .m files generated from the plain code elements of x.
pattern
a non-empty character vector giving the initial part of the name.

Examples

Run this code
cat('', file='test.m')
f <- mfiles('test.m')
f <- mfiles('test.m', '')
# remove all files
unlink(f)

Run the code above in your browser using DataLab