11.07.2015 Views

Introductory Slides for R - Statistics

Introductory Slides for R - Statistics

Introductory Slides for R - Statistics

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Functions and Local Variables> x[1] 1 2 3 4 5> squarefunction (x){x square()Error in square() : argument "x" is missing, with no default> square(x=x)[1] 1 4 9 16 25> x[1] 1 2 3 4 5the right x in square(x=x)comes from workspace, the left x is local to the function.Note that the workspace x is unchanged.27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!