13
Miscellaneous
This chapter collects some other miscellaneous information, such as material about working with variables and strings.
13.1 Working with variables
Various methods of listing information about variables and clearing or deleting variables are provided below.
R |
MATLAB |
ls() |
who |
2. Display a concise list of all defined variables whose names contain “xyz”
.
Is(pattern='xyz') |
who *xyz* |
(R)
: The argument to ls is a regular expression; see help('regex')
for more.
(MATLAB)
: In addition to using the wildcard character “*,” you can use regular expressions to search for variables via a command like who -regexp m[^p];
see doc regexp
for more.
3. Display a more detailed list of all defined variables.
Get R and MATLAB now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.