Chapter 1 Flashcards

1
Q

Console Pane

A
  1. This is the window where you can give Instructions to R.
  2. Language is in 1s and 0s
  3. Answer appears back in the console pane
  4. It is the brain. The mind. The engine.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Environment Pane

A
  1. Shows the things that R has in its head (i. e., datasets, models, etc)
  2. Contains: Import Dataset
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

History Pane

A

Contains the instructions R has run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Bottom right Pane

A

Contains 5 tabs:

  1. Files
  2. Plots
  3. Packages
  4. Help
  5. Viewer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Symbol > with a cursor flashing after is called

A

The prompt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

log(x)

A

Gives the natural log of x, and not the log to base 10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

log10(x)

A

log to base 10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

sin( )

A
  1. Works in radians and not in degrees
    1. For instance, a full circle is 2 x π radians (not 360 degrees)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

sin(2*pi)

A
  1. should be zero, but R tells us it is very close to zero, but not zero
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

sinpi( )

A
  1. Does the ‘multiply by π’ bit for you
  2. Therefore, sinpi(2) does equal zero
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

R ignores white spaces (T or F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

seq( )

A

function to make a series of numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

rm( )

A

stands for remove

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

ls( )

A

stands for list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

rm(list = ls( ))

A
  1. This function is used to clear R’s brain
  2. Read from inside out
  3. ls( ) requests all of the objects in R’s brain
  4. rm( ) asks R to remove all of these objects in the list
  5. list = is new, and is us telling R exactly what information (i.e., argument) we are giving to the rm( ) function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Assignment arrow (less than sign followed by a minus sign)

A
  1. Assigns the answer of a question to an object
  2. Creates names for vectors
17
Q

Script

A
  1. R allows you to type your instructions and save the instructions that R then uses to complete your analysis
  2. Your results become a permanent, repeatable, annotated, shareable, cross-platform archive of your analysis
  3. Essentially, it saves all of your raw data, notes, figures, and analyses in one location
18
Q

What does # represent in R?

A
  1. A symbol that declares that anything after it on that line is a comment (i.e., annotation)
  2. Words and notes for you and people reviewing your script
19
Q

Make sure to use this command/prompt when starting a new script and why?

A
  1. rm(list = ls( ))
  2. to clear R’s Brain
20
Q

install.packages( )

A
  1. Allows you to install packages that does not come with the base packages