Publications by Ozili Nwokobia
Week 8
library(readxl) wisc_bc_data <- read_excel("C:/Users/Ozili Nwokobia/OneDrive/Desktop/wisc_bc_data.xlsx") View(wisc_bc_data) View(wisc_bc_data) str(wisc_bc_data) ## tibble [569 × 32] (S3: tbl_df/tbl/data.frame) ## $ id : num [1:569] 842302 842517 84300903 84348301 84358402 ... ## $ diagnosis : chr [1:569] ...
39 sym R (310824 sym/36 pcs)
Week 7
seeds_dataset <- read.delim("C:/Users/Ozili Nwokobia/OneDrive/Desktop/seeds_dataset.txt", header=FALSE) View(seeds_dataset) str(seeds_dataset) ## 'data.frame': 221 obs. of 8 variables: ## $ V1: num 15.3 14.9 14.3 13.8 16.1 ... ## $ V2: num 14.8 14.6 14.1 13.9 15 ... ## $ V3: num 0.871 0.881 0.905 0.895 0.903 ... ## $ V4: num 5.76...
36 sym R (6793 sym/28 pcs) 5 img
Project 1: Getting Familiar with R
Chapter 6 Load Your Machine Learning Dataset 6.3 Load Data From CSV URL # load the package library(RCurl) # specify the URL for the Iris data CSV dflower <-'https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data' # download the file downloaded <- getURL(dflower, ssl.verifypeer=FALSE) # treat the text data as a steam so we c...
970 sym R (21442 sym/83 pcs) 10 img
Plotting Practice
` ```r se<-function(x){ v<- var(x) n<- length(x) return(sqrt(v/n)) } mySample<-rnorm(100, mean=20,sd=4) se(mySample) ## [1] 0.420738 convert<-function(x){ degree<- (x - 32) / (9/5) return(degree) } vector<-c(12, 67, 78,100) convert(vector) ## [1] -11.11111 19.44444 25.55556 37.77778 x<- rnorm(100) y<- rnorm(100) plot(x,...
570 sym R (2181 sym/25 pcs) 5 img
Week 4
```r library(ggplot2) ggplot(data = mpg) + geom_smooth(mapping=aes(x=displ,y=hwy,linetype=drv)) ## `geom_smooth()` using method = 'loess' and formula = 'y ~ x' ggplot(data = mpg) + geom_smooth(mapping=aes(x=displ, y=hwy)) ## `geom_smooth()` using method = 'loess' and formula = 'y ~ x' ggplot(data = mpg) + geom_smooth(mapping=aes(x=displ, y=hwy,...
68 sym R (4536 sym/48 pcs) 17 img
Data Set
vector<-c(12, 67, 78,100) convert(vector) x<- rnorm(100) y<- rnorm(100) plot(x,y) g<-c(“f”,“f”,“m”,“f”,“m”,“f”,“m”,“m”) sex<-factor(g,levels = c(“f”,“m”)) g sex t<-table(sex,g) library(help=“datasets”) data(“iris”) head(iris) years<-c(1980, 1980, 1985, 1990) scores<-c(34, 44, 56, 83) subject_name<...
1065 sym 1 img
How to use R markdown
# quick summary and plot library(ggplot2) summary(cars) ## speed dist ## Min. : 4.0 Min. : 2.00 ## 1st Qu.:12.0 1st Qu.: 26.00 ## Median :15.0 Median : 36.00 ## Mean :15.4 Mean : 42.98 ## 3rd Qu.:19.0 3rd Qu.: 56.00 ## Max. :25.0 Max. :120.00 qplot(speed, dist, data=cars)+ geom_...
603 sym R (821 sym/6 pcs) 2 img