Unit-1: Introduction to R (R – Objects (Factors (apple_colors <- c('…
Unit-1: Introduction to R
R is a programming language and software environment for statistical analysis, graphics
representation and reporting.
R was created by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand, and is currently developed by the R Development Core Team.
The core of R is an interpreted computer language and R made its first appearance in 1993.
$ yum install R
R – Objects
apple <- c('red','green',"yellow") >print(apple)
M = matrix( c('a','a','b','c','b','a'), nrow=2,ncol=3,byrow = TRUE)
a <- array(c('green','yellow'),dim=c(3,3,2))
apple_colors <- c('green','green','yellow','red','red','red','green')
factor_apple <- factor(apple_colors)
BMI <- data.frame( gender = c("Male", "Male","Female"), height = c(152, 171.5, 165), weight = c(81,93, 78),Age =c(42,38,26) )
R – Variables
var.1 = c(0,1,2,3)
var.2 <- c("learn","R")
c(TRUE,1) -> var.3
Mind Map Prepared by: Srinivas Adapa
Associate Professor, CSE Department, CITM