title: “ASSIGNMENT_2” author: “Hiral Purohit” date: “6/2/2020” output: html_document
scores <- read.csv(“C:/Users/files/scores.csv”)
View(scores) die <- c(scores\(home_goals, scores\)away_goals,scores$match_id) die is.vector(die) length(die) sum(die) typeof(die)
text <- c(scores\(home_country, scores\)home_code) text typeof(text) typeof(scores$home_country) raw(4)
is.vector(die)
raw(scores$home_goals)
attributes(die)
attributes(text)
names(die)
names(text) names(die) <- c(scores\(home_country) names(die) names(die) <- c(scores\)home_country, scores$home_code) names(die) attributes(die) die die+1
dim(die) <- c(scores\(match_id, scores\)home_goals) dim(die) <- c(scores\(match_id) dim(die) <- c(scores\)match_id,5)
m <- matrix(die, nrow=2)
m <- matrix(die, nrow=2, byrow = TRUE) m
ar <- array(c(scores$match_id), dim = c(2,2,3)) ar
hand <- c(scores\(home_country, scores\)home_code) hand
matrix(hand, nrow = 5) matrix(hand, ncol = 5)
hand <- c(scores\(home_country, scores\)home_code)
matrix(hand, nrow = 5, byrow = TRUE) matrix(hand, ncol = 5, byrow = TRUE) class(die)
attributes(die) class(scores$home_code) class(5)
now <- Sys.time() now
typeof(now) class(now) unclass(now)
list <- list(100:130, “R”, list(TRUE,FALSE)) list
card <- list(scores\(home_country, scores\)home_code, 1) card
df <- data.frame(home=c(scores\(home_country, scores\)home_code), away=c(scores\(away_country,scores\)home_goals)) df
typeof(df) class(df) str(df)
df <- data.frame(home=c(scores\(home_country, scores\)home_code), away=c(scores\(away_country,scores\)home_goals), stringsAsFactors = FALSE) df