Lab 1: Popular Computer Software for Biostatistics and Introduction to Descriptive Statistics Flashcards

1
Q

What is R Studio?

A

An IDE or an Integrated Development Environment for R itself, which comes with a code editor and debugger (kind of like putting clothes on a “naked” software)

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

What must be installed first in order for both programs to work? R or R Studio?

A

R itself must be installed first, and then R Studio can be installed.

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

In the lab manuals, what are the bolded phrases?

A

The actual R command/code lines

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

In the lab manuals, what are the blue phrases following a “#”?

A

Notes

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

In the lab manuals, what are the red phrases?

A

The R results that should directly follow the R command/code lines

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

What is the working directory?

A

It is where all of your work is directly processed in R, where you store files for R to retrieve from, and where any files you created/ generated in R will be saved by default

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

What is another good way to think of your directory as?

A

As your working bench in a biomedical research lab

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

When setting your working directory on a PC, what does each aspect of this code mean: >setwd(“C:/R:) ?

A
  • setwd( ) is the function in R to set the working directory
  • (“C:/R”) in the brackets is what this function acts on
  • C:/R is the path for the R folder AKA the folder you’re designating as the working directory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Is the function/ R-built tool you type in the command line case- sensitive?

A

YES!

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

Does the device you’re using (PC vs Mac), impact the way in which you type the command line to set the working directory?

A

YES! It would be different!

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

The command line “>setwd(“/Users/angsun/Desktop/R”) would be used for what kind of device and what is everything before the /R in the brackets called?

A

A Mac and its called the path

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

Is the path for your R folder on your Mac going to be the same as another person’s?

A

NO!

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

The working directory can be set in two ways on a Mac. What are these two ways?

A

By using command lines and my just clicking

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

What always before “

A

An object!

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

What does each aspect of this code mean: >a

A

a: The object

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

All objects are followed by what?

A

An arrow pointing toward them

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

Anything followed by brackets is a what?

A

Function

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

What is another way to write the numbers in the data set in this code: >a

A

a

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

In the code, >a

A

Just that the data set includes all the numbers in between 1 and 10, so it’s kind of like writing 1-10.

20
Q

Can an object be a number?

A

NO

21
Q

Can an object start with a number?

A

NO

22
Q

Can an object contain symbols?

A

NO

23
Q

Is “12” an acceptable object?

A

NO

24
Q

Is “1a” an acceptable object?

A

NO

25
Q

Can an object start with an contain letters?

A

YES

26
Q

Can an object contain numbers as long as it starts with a letter?

A

YES

27
Q

Is “a1” an acceptable object?

A

YES

28
Q

Can an object contain an underline?

A

YES

29
Q

Can an object start with an underline?

A

NO

30
Q

What does the c( ) function do and mean?

A

The function is for setting aggregates, so it means the object includes, combines, and/or contains whatever is in between the brackets

31
Q

What built- in R function would you use to find the average/ mean of a data set?

A

mean( )

32
Q

What built- in R function would you use to find the median of a data set?

A

median( )

33
Q

What built- in R function would you use to find the sum of a data set AKA the result when you add all the numbers of the data set up together?

A

sum( )

34
Q

What built- in R function would you use to find the range of a data set?

A

range( )

35
Q

What built- in R function would you use to find the minimum of a data set?

A

min( )

36
Q

What built- in R function would you use to find the maximum of a data set?

A

max( )

37
Q

What built- in R function would you use to find the varience of a data set?

A

var( )

38
Q

What built- in R function would you use to find the standard deviation of a data set?

A

sd( )

39
Q

What built- in R function would you use to find the 5 number summary of a data set?

A

summary( )

40
Q

What information does a 5 number summary give you all at once?

A

Minimum, 1st quartile, median, 3rd quartile, and maximum

41
Q

What are the two ways in which one can find out how many numbers are in a data set?

A

Using two command lines to make a table or using one command line to find the length of the data set

42
Q

When making a table to determine how many numbers are in a data set, what two functions should you use and what do they tell you?

A

EX: >bsum(b)

          - table ( ) makes a table with the unique numbers in the object in the top row and the individual frequencies at which these numbers appear in the data set in the bottom row
        - sum ( ): Adds up the frequencies at which these unique numbers occur to give us the amount of the numbers in the data set
43
Q

When using the length function to determine how many numbers are in a data set, what function should you use and what does it tell us?

A

length (a), which determines the amount of numbers in the data set right away

44
Q

What is the advantage of using the length function over making a table when trying to determine the amount of numbers in a data set?

A

The length function is easier to use because it only requires the one line of code and gives us the amount of numbers in the data set right away

45
Q

Does R have a built in function to determine the standard error of the mean (SEM)? If not, what must you do and what background knowledge can you use to help you?

A

NO! You must perform several different calculations and use the fact that we know that the SEM is equal to the standard deviation (SD) dividing by the square root of the sample size (n)

46
Q

When trying to determine the SEM, what must you do to determine/define the sample size?

A

You must first find use the table( ) and sum( ) functions or length( ) function to determine the size of the sample and insert that data into object n.