Desktop Survival Guide
by Graham Williams

If Statement

> if (!file.exists("mydata.RData")) 
  { write(myiris, file="mydata.RData") }

The body of the if statement is a single statement (so in the above example the curly brackets are not necessary). The curly brackets are used to collect a number of statements into a single compound statement as the body for the if.

Copyright © Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
The PDF version is a formatted comprehensive draft book (with over 800 pages).
Brought to you by Togaware. This page generated: Sunday, 22 August 2010