Publications by Ryan OHara

Document

26.09.2023

#Professor wants 4 digit answers. options(digits = 4) Question 1 What is the probability of rolling a sum of 12 on three rolls of six-sided dice? Express your answer as a decimal number only. Show your R code. #creating vectors representing sample spaces for the indidual die roll1 <- c(1,2,3,4,5,6) roll2 <- c(1,2,3,4,5,6) roll3 <- c(1,2,3,...

3879 sym R (12214 sym/58 pcs)

Publish Document

24.09.2023

Clear the workspace #clear the workspace rm(list = ls()) #remove all objects from the environment cat("\f") #clear the console gc() #clear unused memory ## used (Mb) gc trigger (Mb) max used (Mb) ## Ncells 520363 27.8 1156558 61.8 660385 35.3 ## Vcells 946423 7.3 8388608 64.0 1769490 13.6 Part 1 Independence: Independence ...

3301 sym R (3041 sym/18 pcs) 1 img

Document

19.09.2023

I. Nuts and Bolts # clear workspace rm(list = ls()) cat("\f") data("Nile") NR <- Nile #assign variable df to contain the data.frame mtcars str(NR) #This function shows the data type of every variable in the data frame ## Time-Series [1:100] from 1871 to 1970: 1120 1160 963 1210 1160 1160 813 1230 1370 1140 ... class(NR) #gives class type of 'N...

5018 sym R (3952 sym/58 pcs) 3 img

Document

15.09.2023

X <- c(2, 5, 7, 8) Y <- c(1, 2, 3, 3) linear_regression = lm(Y ~ X) summary(linear_regression) ## ## Call: ## lm(formula = Y ~ X) ## ## Residuals: ## 1 2 3 4 ## 1.804e-16 -7.143e-02 2.143e-01 -1.429e-01 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) ...

9 sym 1 img

Discussion2_Take2

12.09.2023

Iris Data Set data(iris) str(iris) ## 'data.frame': 150 obs. of 5 variables: ## $ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ... ## $ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ... ## $ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ... ## $ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0....

820 sym R (4277 sym/13 pcs) 5 img

Discussion2

11.09.2023

Iris Data Set data(iris) str(iris) ## 'data.frame': 150 obs. of 5 variables: ## $ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 4.9 ... ## $ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 3.1 ... ## $ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 1.5 ... ## $ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 0....

814 sym R (1719 sym/9 pcs) 3 img