Matlab, R, and Computer Accounts

SOFTWARE CHOICES:

Homework assignments and class slides include plots, statistical functions, etc. geared towards Matlab or R.

R is available for free, and many students prefer it for that reason. Matlab is a commercial product widely used in industry for decades. There are pros and cons to both. Other software may be suitable (e.g., Mathematica, Maple, S-plus, BOOST and other libraries, etc.), but is not supported by class materials, so please check with the instructor if you would like to use other software instead.

You may install Matlab or R on your own computer or use them in the AP&M basement computer labs. Matlab is also available remotely on the ACMS Virtual Computing Lab. It is also available in many labs on campus, and a discounted student edition is available at the bookstore.

For the majority of students, the best option is to install R on your own computer.

INSTALLATION ON YOUR OWN COMPUTER:

Matlab:A discounted student version including the Statistics Toolbox is available at the UCSD bookstore.

R:Download and install R from here.Handouts for the Math 283 Matlab/R tutorial session are posted on the Calendar page. Additional resources are listed at the bottom of this page.

UCSD COMPUTER ACCOUNTS:

ACMS class computer accounts were requested for all regular enrolled students. Concurrent enrollment students are also eligible for them. Auditors must use their own computer resources. ACMS class accounts expire at the end of the quarter, so be sure to save your files elsewhere, like a flash drive or a remote server. If you will be using Matlab or R on your own computer, you will not need to use your class ACMS account.

ACMS account setup:Use theAccount Lookuptool on acms.ucsd.edu to find which ACMS computer labs and servers you have access to; your username, password, and door combination; lab hours; etc. Some resources use your UCSD Active Directory account. Some will use temporary accounts ("ma283......") that are deleted at the end of the quarter. The following ACMS facilities were requested for this class (you may have to use a button "Account ma283 resources" to find them):

- AP&M B349, AP&M B432, AP&M B325: Windows workstations with Matlab and R
- ieng6.ucsd.edu: Linux server for file storage
- ACMS Virtual Computing Lab: Use popular University-licensed software remotely on your own computer (Windows, iPad, Android, Mac OS X, Ubuntu) with a broadband internet connection. Matlab is included. See govirtual.ucsd.edu.
- VNCgnome: Remote access to a Linux desktop GUI. See acms.ucsd.edu/info/vncgnome.html.

Math graduate students:The math department computer labs have R and Matlab. The Linux server euler.ucsd.edu has Matlab and R for remote access. The main math department server, math.ucsd.edu, has very old versions (2006) of these, which should not be used.

ABOUT MATLAB:

- Commercial product. Discounted student version sold at UCSD bookstore.
- Installed in ACMS computer labs in AP&M B349, B432, B325 (all of which are Windows machines).
- General Matlab documentation
- Statistics toolbox
- Matlab/R tutorial
- The GUI version of Matlab has help available through a menu.
- At the command line, help is available via
help sum

(wheresumis replaced by the exact command name or topic).- For a list of Matlab statistical functions, look up the Statistics Toolbox in the Matlab help browser, or type
help stats

ABOUT R:

- R Project homepage and free download site (Windows, Mac, Linux).
- Official documentation is included in the downloadable R package. The R Project homepage includes several types of documentation. See the FAQs and manuals, particularly the introduction and the R language manuals.
- Unofficial documentation:

Reference card

Short list of R commands

Tutorial

Quick-R

Array of multiple figures in a single window

Multiple Plots in a Figure- Matlab/R tutorial
- The GUI version of R has help available through a menu.
- At the command line, help is available via these four forms:

help(sum) help("sum") ?sum ?"sum"

(wheresumis replaced by the command you want).

Use the quoted forms if you get syntax errors, e.g., for reserved words and symbols:?+and?iffail but?"+"and?"if"work.- It gives an error if you don't know the
exact nameof the function:

?negativegives an error

help.search("negative")suggests topics related to "negative"- For a list of R statistical functions, use

library(help='stats');

Pick out topics/commands from the list and usehelpon them; e.g., for functions related to the Normal Distribution, use

help(Normal)