DEM 7273 -

Question a. Calculate 444

> 4^4^4
[1] 1.340781e+154

Question b. Calculate exp(4/8)

> exp(4/8)
[1] 1.648721

Question c. Assign a value of 10 to an object called x

> x <- 10
> x
[1] 10

Question d. Assign a vector of 1 to 5 to an object called y

> y <- c(1,2,3,4,5)
> y
[1] 1 2 3 4 5

Question e. Calculate the result of log(x*y)

> log(x*y)
[1] 2.302585 2.995732 3.401197 3.688879 3.912023

Question f. Store the result of log(x*y) to an object called z

> z<-log(x*y)
> z
[1] 2.302585 2.995732 3.401197 3.688879 3.912023

Question g. Test if the last element of object y is greater than 5

> length(y)
[1] 5
> y[5]>5
[1] FALSE

Question h. Identify the structure of x, y, and z

> structure(x)
[1] 10
> structure(y)
[1] 1 2 3 4 5
> structure(z)
[1] 2.302585 2.995732 3.401197 3.688879 3.912023

Question i. Load data covid19 at Bexar county, and view the data

> #install.packages("covid19.analytics")
> library(covid19.analytics)
> #covid19.genomic.data() 
> data<-covid19.data("ts-confirmed")
Data being read from JHU/CCSE repository
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Reading data from https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv
Data retrieved on 2020-09-08 19:59:00 || Range of dates on data: 2020-01-22--2020-09-07 | Nbr of records: 266
-------------------------------------------------------------------------------- 

Question j. What’s the size of this data frame? How many rows, and how many columns?

> dim(data)
[1] 266 234

Question k. Add proper notation to this exercise and publish the results to Rpubs.