ISYS3447 - Week 3 Notes
ISYS3447 - Week 3 Notes
Categorical Variable
Example:
Bar Chart:
Quantitative Variables
Scatter Chart:
plot(dataset$column, dataset$column,
xlab = "insert x axis name", xlim=c(x1,x2),
ylab= "insert y axis name", ylim=c(x1,x2),
main = "insert main title",
col = "choose a color")
Covariance
-1-
RMIT Classification: Trusted
cov(dataset$column, dataset$column)
Correlation Coefficient
cor(dataset$column, dataset$column)
head(dataset)
dataset[row,column] returns a single value.
dataset[row,] returns a row.
dataset[,column] returns a column.
dataset[c(rowx,rowy),] returns a more than one row.
dataset[,c(columnx,columny)] returns a more than one column.
dataset[c(rowx:rowy),] returns a range of rows.
dataset[,c(columnx:columny)] returns a range of columns.
dataset[dataset$column == “name of the item”] returns a specific value.
dataset[dataset$column >= “name of the item”] returns some specific
values.
Supplementary Functions
Arithmetic Operators in R
+ Addition
– Subtraction
* Multiplication
/ Division
^ Exponent
-2-
RMIT Classification: Trusted
Relational Operators in R
== Equal to
!= Not equal to
Logical Operators in R
! Logical NOT
| Element-wise logical OR
|| Logical OR
Assignment Operators in R
-3-