Publications by user
ID3
d = iris library(caTools) library(rpart) library(rpart.plot) library(caret) ## Loading required package: ggplot2 ## Loading required package: lattice # Splitting set.seed(20) # Setting the seed sample =sample.split(d$Species, SplitRatio = .70) Train=subset(d, sample==TRUE) Test=subset(d, sample==FALSE) # Training the decision Tree classif...
14 sym R (2725 sym/8 pcs) 3 img
Project
Opening all packages library(ggplot2) library(gganimate) library(plotly) ## ## Attaching package: 'plotly' ## The following object is masked from 'package:ggplot2': ## ## last_plot ## The following object is masked from 'package:stats': ## ## filter ## The following object is masked from 'package:graphics': ## ## layout lib...
1809 sym R (2624 sym/15 pcs) 1 img
Assignment 1
Assignment 1 Do the Following Calculations: a. (54)^(45)-56 (5*4)^(4*5)-56 ## [1] 1.048576e+26 b. 23-1*(8-12) 23-1*(8-12) ## [1] 27 c. 56/8*(3+4) 56/8*(3+4) ## [1] 49 d. 45-5*8+(8+9) 45-5*8+(8+9) ## [1] 22 Create the following vectors a. (2,5,6,7) a<-c(2,5,6,7) a ## [1] 2 5 6 7 b. 1,0,9,8 b<-c(1,0,9,8) b ## [1] 1 0 9 8 c. 6,5,8,3 c<-c...
206 sym
Assignment 2
Assignment 2 Create the vector a<-c(2,5,6,7) b<-c(1,0,9,8) c<-c(6,5,8,3) Row Bind the vectors into 3x4 mat<-rbind(a,b,c) mat ## [,1] [,2] [,3] [,4] ## a 2 5 6 7 ## b 1 0 9 8 ## c 6 5 8 3 Naming Matrix colnames(mat)<-c("Mon", "Tue", "Wed", "Thu") rownames(mat)<-c("Present","Absent","On leave") mat ## ...
204 sym 3 img
Assignment 1
#Do the Following Calculations: ##a. (5*4)^(4*5)-56 (5*4)^(4*5)-56 ## [1] 1.048576e+26 ##b. 23-1*(8-12) 23-1*(8-12) ## [1] 27 ##c. 56/8*(3+4) 56/8*(3+4) ## [1] 49 ##d. 45-5*8+(8+9) 45-5*8+(8+9) ## [1] 22 #Create the following vectors ##a. (2,5,6,7) a<-c(2,5,6,7) a ## [1] 2 5 6 7 ##b. 1,0,9,8 b<-c(1,0,9,8) b ## [1] 1 0 9 8 ##c. 6,5,8,3 c<...
17 sym
Analysis of Kenyan National Parks
#1.ASK #1.0 Business task #Which parks have the highest number of visitors in a year. #Which parks have the highest lowest number of visitors in the year. #Which months bring in the highest and lowest number of visitors in the parks #Find out the total revenue per month for all the parks #1.1 Stakeholders #stakeholders include the following...
89 sym R (30845 sym/74 pcs) 12 img
HAVING FUN WITH R
Sys.time() ## [1] "2023-06-24 19:38:10 +01" # Question 1 # creating five vectors of integers a <- c(1,2,3,4,5,6) b <- c(2,4,6,8,10,12) c <- seq(10,60,10) d <- seq(1,12,2) e <- 10:15 # combining the vectors to form a matrix A <- cbind(a,b,c,d,e) rownames(A) <- letters[21:26];A ## a b c d e ## u 1 2 10 1 10 ## v 2 4 20 3 11 ## ...
102 sym
Document
library(ggplot2) library(ggrepel) library(ggthemes) library(extrafont) ## Registering fonts with R library(grid) library(cowplot) ## ## Attaching package: 'cowplot' ## The following object is masked from 'package:ggthemes': ## ## theme_map library(readr) EconomistData <- read_csv("EconomistData.csv") ## New names: ## • `` -> `...1...
47 sym R (7065 sym/28 pcs) 16 img