T1: Getting startet Flashcards
THE POWER OF R IN DATA
ANALYSIS
- Comprehensive statistical analysis capabilities
- Rich ecosystem with numerous libraries
- Popularity in the data science community
Python is the same, but it is more popular in the industry. That + comes with it
being less reliable -
INTEGRATED DEVELOPMENT
ENVIRONMENTS (IDES)
What is an IDE?
* Streamline, manage, and execute coding
* Debugging
* Testing
* Enhance productivity
* Collaboration
EXPLORING R STUDIO
Comprehensive IDE tailored for R
* Features: Script editor, console, plots, and more
* Integrated tools for reproducible research
NAVIGATING THE R STUDIO
INTERFACE
- Script/source Panel:
Write and execute R
scripts - Console: Direct R
commands and view
outputs - Environment: Monitor
variables, data frames,
and more - Output: Plots, Packages,
and Help: Visualization
and extensions
IN-BUILT HELP
> [function name] ## Executes the function
?[function name] ## gets you help
information
DEBUGGING
How to ask for help:
I was attempting to [desired behavior]
This is my code [code]
This is what happens [error or output]
E.g.
I was trying to [merge two columns, so as to get a matrix]
rbind(c1, c2)
I get a long column instead.
BASIC DATA TYPES
a <- 2
x <-
c(1,2,3,4)
x*2
>x
DATA TYPES
Numbers
* 1, 2, 3
* 3.14
Strings/characters
* “Hello world”
Booleans
* TRUE / FALSE (T /
F)
BASIC OPERATORS
For numerical values (x
and y)
Arithmetic operators:
x+y
x-y
x*y
x/y
x^y
x%%y
For boolean values (x
and y)
Logical operators
! x
x & y
x | y
BASIC FUNCTIONS
Create/load data:
* c()
* matrix()
* data.frame()
* read.table()
* read.csv()
Descriptives:
* mean()
* min()
* max()
* sum()
Data operations:
* subset()
BASIC FUNCTIONS
x <- c(1,2,3,4,5,-3,0,2)
sum(x)
max(x)
min(x)
subset(dataframe, logic
expression) hist()
CONTROL STRUCTURES
if(TRUE) {
print(“Yes it
is.”)
}
for(i in
1:10)
{ print(i)
}
IMPORTANT DAYA TYPES
- Vector
- Data
frame
Others:
Matrix,
List