STAT 2: Basic R Definitions Flashcards
1
Q
Define workspace/working environment
A
- the current R working environment, including any user-defined objects (vectors, matrices, data frames, functions, lists)
- anything you create during an R session
2
Q
Define objects
A
- a container for data values, where they may be stored and later retrieved
- in R, all types of data are treated as objects
3
Q
Define packages
A
- R packages are collections of functions and data sets developed by the community
4
Q
Define a function
A
- an object in R
- the R interpreter is able to pass control to the function
- syntax in picture
5
Q
Define argument
A
- named when you define a function
6
Q
What is a directory
A
- a system of folders that files are organised into
7
Q
What is a data frame?
A
- a table or other structure where each column contains values of one variable and each row contains one set of values from each column
- can be numerical or categorical
8
Q
What is a vector?
A
- a sequence of data elements of the same basic type
- members in a vector are called components
- e.g. c(2,3,5) is a vector containing 3 numeric values: 2,3,5
9
Q
Define working directory
A
- where the current R session accesses files and saves data to
10
Q
What is an R notebook?
A
- independent executes codes
- makes attractive outputs in a user-friendly way