Publications by Adam Gersowitz

MSDS Bridge R HW 1

21.12.2019

knitr::opts_chunk$set(echo = TRUE) #1. Write a loop that calculates 12-factorial #NOTE: Would replace 1:12 with 1:n and uncomment lines 19 and 25 to base the factorial on input #n = as.integer(readline(prompt="Input number: ")) f = 1 for(x in 1:12) { f = f * x } print(paste("12- factorial =",f)) ## [1] "12- factorial = 479001600" #print(...

5 sym R (1330 sym/13 pcs)

DATA606 HW1

31.01.2020

Smoking habits of UK residents. (1.10, p. 20) A survey was conducted to study the smoking habits of UK residents. Below is a data matrix displaying a portion of the data collected in this survey. Note that “\(\pounds\)” stands for British Pounds Sterling, “cig” stands for cigarettes, and “N/A” refers to a missing component of the dat...

7452 sym

AGersowitz Data 605 final Exam

12.12.2020

Problem 1. *Using R, generate a random variable X that has 10,000 random uniform numbers from 1 to N, where N can be any number of your choosing greater than or equal to 6. Then generate a random variable Y that has 10,000 random normal numbers with a mean of \[\mu=\sigma=(N+1)/2\] N<-15 X<-runif(10000,1,N) print("Length, Mean, Min, and Max of X...

6850 sym R (21451 sym/118 pcs) 6 img

621_HW1

01.03.2021

Libraries library(knitr) library(tidyverse) library(reshape2) library(VIM) library(corrplot) library(naniar) library(tidyverse) library(skimr) library(funModeling) library(fastDummies) Data In this homework assignment, we are asked to explore, analyze and model a baseball data set containing approximately 2200 records. Each record represents a p...

1405 sym R (23093 sym/26 pcs) 8 img 2 tbl

HW 1 Era Model

01.03.2021

Libraries library(knitr) library(tidyverse) library(reshape2) library(VIM) library(corrplot) library(naniar) library(tidyverse) library(skimr) library(funModeling) library(fastDummies) Data In this homework assignment, we are asked to explore, analyze and model a baseball data set containing approximately 2200 records. Each record represents a p...

3439 sym R (17507 sym/15 pcs) 5 img

DATA 621 HW 2

14.03.2021

library(readr) library(dplyr) library(kableExtra) library(plotly) library(DescTools) df <- read_csv("https://raw.githubusercontent.com/agersowitz/DATA-621/main/classification.txt") df <- data.frame(df) table(df$class,df$scored.class)%>% kbl(caption = "Confusion Matrix") %>% kable_classic(full_width = F, html_font = "Cambria")%>% kable_sty...

1074 sym R (4637 sym/11 pcs) 1 img 1 tbl

DATA 608 HW 3

13.03.2021

Packages and Importing the Data library(shiny) library(readr) library(plotly) library(vegalite) library(skimr) library(kableExtra) df <- read_csv("https://raw.githubusercontent.com/charleyferrari/CUNY_DATA_608/master/module3/data/cleaned-cdc-mortality-1999-2010-2.csv") df <- data.frame(df) skim(df) Data summary Name df Number of rows 9961 ...

905 sym R (1065 sym/3 pcs) 4 tbl

HW3

12.04.2021

##Collect Data library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ── ## ✓ ggplot2 3.3.2 ✓ purrr 0.3.4 ## ✓ tibble 3.0.3 ✓ dplyr 1.0.2 ## ✓ tidyr 1.1.2 ✓ stringr 1.4.0 ## ✓ readr ...

3104 sym R (23500 sym/62 pcs) 1 img 3 tbl

HW4

26.04.2021

Data Prep Using a function created by groupmate David Blumenstiel I will fetch, clean and prep the data for this assignment. Data Exploration As the first step in data exploration I use the skim function form the skimr package. This shows missing data, mean, percentiles and a histogram of the distribution of all of the data fields all in one out...

847 sym R (12135 sym/25 pcs) 1 img 4 tbl

624 Project 2

13.12.2021

Project 2 library(caret) ## Loading required package: ggplot2 ## Loading required package: lattice library(readxl) library(tidymodels) ## Registered S3 method overwritten by 'tune': ## method from ## required_pkgs.model_spec parsnip ## ── Attaching packages ────────────────────�...

1407 sym R (23238 sym/78 pcs) 8 img