R-intro - Introduction to Using R R is an object oriented...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Using R R is an object oriented programming language. We are NOT going to learn to write programs in R. Rather, we will apply R functions written by others to our data sets in order to analyze the data and then we will interpret the output from these functions. In order to understand what R is doing for us, there are a few fundamentals about the language and how it operates that we should understand. Prompts: When R is waiting for us to tell it what to do, it begins the line with > If we give it an incomplete command and it can not finish the task requested it provides + To get out of R we use the command > q() R as a Calculator: At the prompt, we enter the expression that we want evaluated and when we hit enter, it will compute the result for us. For Example: > 4+6 Use * for multiply. Use ^ for raised to the power of. Use parentheses to ensure that it understands what you are trying to compute. The order of doing arithmetic operations is (left [done first] to right [done last]) ^ / * - + Built-in Functions: pi exp(3) ## provides the cube of e log(1.4) ## provides the natural logarithm of the number 1.4 log10(1.4) ## provides the log to the base of 10 sqrt(16) ## provides the square root of 16
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Assignment Statements: Just like in algebra, we often want to store a computation under some variable name. The result is assigned to a variable
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

R-intro - Introduction to Using R R is an object oriented...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online