Publications by Emmanuel Thompson

Project 3: Continuous Frequency Distribution

11.02.2020

Problem: From the World Bank Data, do the following: Construct histograms for Life Expectancy (lifeExp) for each continent and comment briefly on each. Use the rule of thumb ( 5 to 20) to decide on a reasonable number of bars). Below are simple R-code to help you read and subset data by continent. library(readr) world_bank_data <- read_csv("wo...

905 sym R (371 sym/1 pcs)

Project 2: Categorical Frequency Distribution

30.01.2020

Use R/RStudio to work on the following problems from the textbook. Exercises 2–1, Question 13 page 52. Exercises 2–1, Question 14 page 52. Note: Before working on the project, make sure you have reviewed 2.1: Organizing data. Write your code using R Script \((Ctrl + Shift + N)\) and make sure you save your script. Once you are done, test y...

583 sym

Visual Display of Data in R

19.01.2020

Types of visual displays to be covered Qualitative (Categorical) Data: Bar graph Pie chart Quantitative (Numerical) Data: Histogram Boxplot Data sets used birthwt.csv healthexp.csv Import the data sets library(readr) birthwt <- read_csv("birthwt.csv") expd <- read_csv("healthexp.csv") Structure of data sets str(birthwt) ## Classes 'spec_t...

583 sym R (3905 sym/19 pcs) 11 img

Visualizations in R

16.01.2020

Visualization using ggplot2 ggplot2 package in R was written by Hadley Wickham for visualizing data. It provides a powerful model of graphics that makes it easy to produce complex multi-layered graphics. We will be using the birthwt data set for visualizations with ggplot2 therefore we first need to import the data set. Import the birthwt.csv a...

1236 sym R (1656 sym/15 pcs) 13 img

Project 1: Importing Data into RStudio Cloud (Due: Jan 31 on Moodle)

08.01.2020

Instructions Uploading a file to a cloud RStudio instance Watch the video on importing files and datasets to RStudio Cloud before doing this project Import the the following datasets to RStudio Cloud: Wholesale_customers_data.csv world_bank.txt sweden_motor_insurance_xlsx Once you are done with the importation for each of the datasets, take a...

596 sym 1 img

Import Data into R

07.01.2020

Introduction Data come in a variety of formats. Depending on the format, R has a specific function and argument. Below, we show how to import data into R for different formats. Importing Files and Datasets to RStudio Cloud (Very Important) Uploading a file to a cloud RStudio instance This video shows you how to import files and datasets into ...

373 sym 1 img

R & RStudio

07.01.2020

Introduction Both R and RStudio are free, open-source software, available for all commonly used operating systems, including Windows, macOS, and Linux systems. Installing R for Windows Go to the Comprehensive R Archive Network (CRAN) and select a mirror site; a list of CRAN mirrors shows up at the upper left of the CRAN home page. I recommend ...

3386 sym 1 img

2.1: Organizing data

30.01.2020

Categorical Frequency Distribution # Data grade <- c("C", "A", "B", "C", "D", "F", "B", "B", "A", "C", "C", "F", "C", "B", "D", "A", "C", "C", "C", "F", "C", "C") # Frequency freq <- table(grade) freq ## grade ## A B C D F ## 3 4 10 2 3 \[\mbox{Relative Frequency}=\frac{\mbox{Frequency}}{\mbox{Total Frequency}}\] # Relative ...

120 sym R (1457 sym/12 pcs)

2.2: Visualizing Data (Histogram)

04.02.2020

Histogram Histogram for Age options(warn=-1) age <- c(11, 10, 22, 50, 52, 50, 22, 28, 30, 31, 30, 29, 40, 40, 41, 36, 39, 54, 55, 64) min <- min(age) max <- max(age) range <- max - min classes <- 5 class_size <- trunc(range/classes) + 1 class_size ## [1] 11 hist(age, main = "Ages of Chronic Migraine Patients", xlab = "Age in ...

66 sym R (921 sym/6 pcs) 2 img

2.2_2.3: Visualizing Data

11.02.2020

Visualizing Data from existing Data in a csv or excel file or txt Histogram of Income from Credit data library(readr) Credit <- read_csv("Credit.csv") ## Parsed with column specification: ## cols( ## id = col_double(), ## Income = col_double(), ## Limit = col_double(), ## Rating = col_double(), ## Cards = col_double(), ## Age = col_d...

255 sym R (1508 sym/6 pcs) 4 img