Publications by john mazon
week1 - bridge program 2020
#R Program to compute the factorial of 12 num = 12 fact = 1 for(i in 1:num) { fact=fact * i } print(paste(“The factorial of”, num, “is”, fact)) #numeric vector sequence of 20 to 50 by 5 vector <- seq(20, 50, by=5) print (vector) #Create a function named Quadratic that inputs a trio of numbers a,b,c and solves the quadratic equation a=1 b=...
433 sym
Lab 1: Intro to R
The RStudio Interface The goal of this lab is to introduce you to R and RStudio, which you’ll be using throughout the course both to learn the statistical concepts discussed in the course and to analyze real data and come to informed conclusions. To clarify which is which: R is the name of the programming language itself and RStudio is a conven...
17823 sym R (1405 sym/27 pcs) 8 img
CUNYSPS_DATA607_Assignment1
Loading Data into a Data Frame - Data Analysis of Foul Ball Impact on fans Often times the objective of Data Scientists is to take data in one form and transform it for simpler downstream Analysis. This is accomplished by tidying and transformation operations. Although this task has been completed in R, it could also have been tackled using other...
3369 sym R (4212 sym/25 pcs) 1 img
Lab 1: Intro to R
library(tidyverse) library(openintro) Exercise 1 arbuthnot$girls ## [1] 4683 4457 4102 4590 4839 4820 4928 4605 4457 4952 4784 5332 5200 4910 4617 ## [16] 3997 3919 3395 3536 3181 2746 2722 2840 2908 2959 3179 3349 3382 3289 3013 ## [31] 2781 3247 4107 4803 4881 5681 4858 4319 5322 5560 5829 5719 6061 6120 5822 ## [46] 5738 5717 5847 6203 6...
3944 sym R (2268 sym/15 pcs) 3 img
Lab 2 - DATA 606
library(tidyverse) library(openintro) Exercise 1 Look carefully at these three histograms. How do they compare? Are features revealed in one that are obscured in another? The histograms number 1 and number 2 which have smaller bin sizes depict the data in more specific details as compared to histogram number 3. Histogram number 3 with the 150 b...
12800 sym R (4643 sym/28 pcs) 7 img
Confidence intervals - LAB 5
library(tidyverse) library(openintro) library(infer) us_adults <- tibble( climate_change_affects = c(rep("Yes", 62000), rep("No", 38000)) ) ggplot(us_adults, aes(x = climate_change_affects)) + geom_bar() + labs( x = "", y = "", title = "Do you think climate change is affecting your local community?" ) + coord_flip() u...
14872 sym R (1752 sym/14 pcs) 1 img
Assignment 7 - John Mazon
Working with XML and JSON in R installed the packages below to be able to properly work with xml,json, html data install.packages(“xml2”) install.packages(“jsonlite”) CSV,HTML,XML,JSON format of all book data input - Picked three of your favorite books on one of your favorite subjects. At least one of the books has more than one author. ...
921 sym R (2496 sym/14 pcs)
DATA 607 - Project 1
Data Analysis for Chess Tournament #calling in the library for RCurl and stringr library(RCurl) library(stringr) Incorporating text file from Github repo source Used to read in the original text file from an accessible location. In this case i’ve uploaded the tournament info text file into my gitub repo txt_file2 <- readLines("https://raw.gi...
577 sym R (14233 sym/29 pcs)
Chapter 3 - Probability
install.packages(“VennDiagram”) install.packages(“grid”) Dice rolls. (3.6, p. 92) If you roll a pair of fair dice, what is the probability of getting a sum of 1? Using pair of fair dice probability of getting sum of one is 0 [0/36] Cannot be below 2 getting a sum of 5 Using pair of fair dice probability of getting sum of 5 is 4/36[0.11]...
6115 sym R (1419 sym/33 pcs) 1 img
DATA 606 Lab 3 - Probability
library(tidyverse) library(openintro) Exercise 1 What does a streak length of 1 mean, i.e. how many hits and misses are in a streak of 1? What about a streak length of 0? Streak of one mean Kobe Bryant hit a shot then missed the next shot In a streak of 1 there are one hit and one miss Streak of 0 means Kobe Bryant missed one shot. There are c...
12309 sym R (1457 sym/24 pcs) 6 img