Week 1: Using R and R Studio
What is descriptive statistics?
A method of organising, summarising and presenting data in an informative way
What is continuous data?
Data that can be expressed with any chosen level of precision e.g. height, weight
What are 4 things for good practice in R?
Keep code readable, follow naming conventions, add comments, keep a record
What are the 4 sections of R Studio?
Script window, plotting area, console, global environment
What is the first thing you do in R?
Set working directory
What is c()?
a function to create a list
What is a barchart?
a plot which uses bars of different heights to compare the relative amounts or percentages from different categories
What is a function?
a set of statements that work together to perform a specific task
What is R studio?
an integrated development environment (IDE) for R
What is ':'?
an operator called sequence
R code for a bar chart
barplot(table(whale$species)
R code for a box and whisker plot
boxplot(whales$length ~ whale$species)
What is discrete data?
data with only a limited number of values, e.g. hair colour, gender
What is a scatterplot?
displays two sets of data to see if there is a correlation.
Quantitative data uses words. T/F?
false
What is R?
free programming language used for statistical computing and graphics
What is a histogram?
groups numbers into ranges, the height of the bar shows how many fall into each range
R code for a histogram
hist(whale$length)
What functions can be used to describe continuous variables?
mean(), median(), var(), sd(), quantile(), IQR(), range().
measures of central tendency
mean, median, mode
Do descriptive statistics measure confidence? yes/no
no
R is available under an ____-_____ _______
open-source license
R code for a scatterplot
plot(whales$length, whales$age)
measures of variability
range, variance, standard deviation
What is the function body?
set of statements that allows the function to do its task
What is a vector?
single entity consisting of a collection of things
R code to make a subset
sperm_whale <- subset(whale, species == "sperm whale").
Give 6 examples of functions
sum(), seq(), max(), mean(), length(), summary()
What is the return value?
the output of the function
What is statistics?
the science of collecting, organising, analysing, interpreting and presenting data
What is an argument?
the value you pass into the function, within the brackets
Discrete data is also known as ordinal or categorical. T/F?
true
Quantitative data can be discrete or continuous. T/F?
true
Quantitative data uses numbers. T/F?
true
What is a box and whisker plot?
visualises data distribution through quartiles
Do descriptive statistics measure central tendency? yes/no
yes
Do descriptive statistics measure variability? yes/no
yes