Write a sequence of Matlab commands to fdaMatlabPath.m in the
working directory containing commands to add fdaM to the path
for Matlab.
Usage
fdaMatlabPath(R.matlab)
Arguments
R.matlab
logical: If TRUE, include '~R/library/R.matlab/externals' in the
path. If(missing(R.matlab)) include '~R/library/R.matlab/externals'
only if R.matlab is installed.
Value
A character vector of Matlab addpath commands is returned
invisibly.
Details
USAGE
{
If your Matlab installation does NOT have a startup.m file,
it might be wise to copy fdaMatlabPath.m into a directory
where Matlab would look for startup.m, then rename it to
startup.m.
If you have a startup.m, you could add the contents of
fdaMatlabPath.m to startup.m.
Alternatively, you can copy fdaMatlabPath.m into the
directory containing startup.m and add the following to the
end of startup.m:
lll{
if exist('fdaMatlabPath')
fdaMatlabPath ;
end }
}
ALGORITHM{
1. path2fdaM = path to the Matlab/fdaM subdiretory of the
fda installation directory.
2. Find all subdirectories of path2fdaM except those beginning in
'@' or including 'private'.
3. if(requires(R.matlab)) add the path to MatlabServer.m
to dirs2add
4. d2a <- paste("addpath('", dirs2add, "');", sep='')
5. writeLines(d2a, 'fdaMatlabPath.m')
6. if(exists(startupFile)) append d2a to it
}
# Modify the Matlab startup.m only when you really want to,# typically once per installation ... certaintly not# every time we test this package.fdaMatlabPath()