r studio Flashcards

1
Q

Script

A

here you ca write your commands

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

console

A

R will carry out mathematics, functions- computations in the console. You can
directly type in commands in the console, or you can
select the commands you want to run in the script

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

install.packages(“tidyverse”)

A

install.packages(“tidyverse”)

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

brackets mean

A

function

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

Load the tidyverse package using, we need to install once, but then we need to load it

A

library(“tidyverse”)

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

check which directory you are in

A

getwd()

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

when you want to view

A

View()

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

when you want to connect

A

pipe operator, >%>

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

connect stars wand view

A

starswars>%>View()

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

what do you do when you are interested in one variable

A

dataset>%>select()>%:>View()

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

if you want to look at the mean, average data in console

A

dataset>%>summary()

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

when you want to install a data set and create and object

A

titanic<-read.csv (“titanic.csv”, sep=”,”)

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

when we put the arrow what it means

A

we create a new object

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

what do we tell after the arrow

A

after the arrow we tell how to create the object

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

how do you import a data set

A

read.csv

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

after read.csv what do we put

A

read.csv (“titanic.csv”, sep=”,”)

17
Q

how many variables code

A

titanic %>% colnames()

18
Q

now we want to create a new object from the titanic and only choose fare

A

drownedpassengers <- titanic %>% select(Survived, Fare)

19
Q

if you want to choose one specific

A

we use the function filter()

20
Q

if we want to filter only the ones who didn’t survive

A

drownedpassengers <- drownedpassengers %>%
filter(Survived == 0)

21
Q

explain what the Global environment is, where to find it and how to clean it

A

Global Environment refers to the workspace where all user-defined objects, such as variables, data frames, functions, and plots, are stored during your R session.

22
Q

change environment

A

setwd

23
Q

<-

A

left assigenemtn operator, used to assign to variables or objects

24
Q

what is a package

A

it is a package of tools, functions and codes