Logical Operators
RStudio Panes
Data Types
Data Structures
Subsetting and Indexing
100

You can use this to test whether something on the left is less than or equal to something on the right.

<=

100

This pane shows the output of your R code.

Console

100

R treats this data type like numbers.

Numeric

100

This type of vector is neither radioactive nor very small, but it is coercive.

atomic vector

100

What would be printed in the output if you ran this code:
object <- c("goodbye",  "see ya", "wouldn't wanna be ya")
object[2]

"see ya"

200

It's made out of sand and amber.

&

200

This pane will save your R code for later, but you can use it to run your code too.

Source 

200

If you have more than one piece of text, you have a string. What data type is this?

Character

200

Using the c() function creates what kind of vector?

an atomic vector

200

You can index a ____ in three ways: 

1. object[number]

2. object["name"]

3. object$name

list

300

Convert this logical sentence to R code that uses numeric data and logical operators: not 57

!57

300

This pane is where you can

Files

300

People say this data type is a real character at parties, but unlike a literal character, it has levels.

Factor

300

What data structure is like a list but with two dimensions?

a matrix

300

What does it mean to "subset" a dataframe?

Limit the dataframe to certain rows and/or columns

400

Convert this logical sentence to R code that uses character data and logical operators:
Cats or Squirrels are equivalent to Doggy Chew Toys.

"Cats" | "Squirrels" == "Doggie Chew Toys

400

If R objects were files, this pane would be your filing cabinet. 

Environment

400

You can ask R if data is character data using this code: "_____.character()". 

is

400
This data structure is the most common type of data structure, and has column names, row numbers, and sometimes even row names.

dataframe

400

What does the x and y stand for in this code?

object[x, y]

x is the row number, y is the column number or name

500

Sometimes people confuse this for "equivalent to" when it actually means something more like "assignment".

=

500

You can see the history of R functions you have run by looking in this pane.

Environment

500

5 is a factor when it should be numeric. How can you convert it to numeric in a way that prevents R from changing the number?

Convert 5 to a character first, then convert it to numeric.

500

Which type of vector shows you the chronological number of each entry by default (the output shows a number above each entry)?

list

500

How do you use subsetting to select more than one column column (but not all columns)?

object[, c("column.name.1", "column.name.2")