week2

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/4

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

5 Terms

1
New cards

vectors in R

Vectors are variables that store multiple pieces of information 
◦ create vectors using c() 
◦ extract specific elements using [ ] 

2
New cards

as.factor()

  • A factor is a nominal scale variable 

  • Use the “as.factor()” command to convert a character vector to a factor 

3
New cards

built-in functions in R

  • The order of the arguments matters, unless you specify the names 

    e.g. The default number of digits to round to is 0 

4
New cards

reading in data files

variable ← read.csv(file)

5
New cards

subset data frame

create a variable for a certain group (subset) of data and calling it

e.g. makes ← expt$gender == ‘male’

expt[males,]