Publications by Dimple K. Patel

HarvardX: PH125.1x

05.01.2024

Section 4.2 Examine the built-in dataset co2. Which of the following is true: library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot...

642 sym R (22953 sym/11 pcs)

HarvardX: PH125.1x

05.01.2024

Section 3.6 What will this conditional expression return? x <- c(1, 2, -3, 4) if(all(x>0)){ print("All Positives") } else { print("Not all positives") } ## [1] "Not all positives" Which of the following expressions is always FALSE when at least one entry of a logical vector x is TRUE? x<-c(TRUE, FALSE, TRUE) y<-c(TRUE, FALSE, FA...

1281 sym R (2187 sym/33 pcs) 2 img

HarvardX: PH125.1x

01.01.2024

Section 2.3 1. What is the sum of the first 100 positive integers? The formula for the sum of integers 1 through n is \(n(n+1)/2\). Define n=100 then use R to compute the sum of 11 through 100 using the formula. What is the sum? n<-100 num100<-(100)*(100+1)/2 num100 ## [1] 5050 Now use the same formula to compute the sum of the integer...

8115 sym R (15144 sym/106 pcs) 4 img