-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmfiles.Rd
47 lines (39 loc) · 1.13 KB
/
mfiles.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/OctaveFunction-class.R
\name{as.mfile}
\alias{as.mfile}
\title{M Files}
\usage{
as.mfile(..., pattern = "mfile_", dir = tempdir())
}
\arguments{
\item{...}{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 existing files.}
\item{pattern}{a non-empty character vector giving the initial part
of the name.}
\item{dir}{existing directory where to write the .m files generated from
the plain code elements of \var{x}.}
}
\description{
\code{as.mfile} converts source code or .m filenames into real paths to .m files
that can be sourced with \code{\link[RcppOctave]{o_source}}.
}
\examples{
\dontshow{
options(R_CHECK_RUNNING_EXAMPLES_=TRUE) ## roxygen generated flag
}
f <- as.mfile('test.m')
f
# detected code elements are written into temporary files
f <- as.mfile('test.m', "function [y] = myfun()
y = 1;
end
")
\dontrun{
file.show(f[2])
}
# remove all files
unlink(f)
}