lab 1

.pdf

School

University of California, Berkeley *

*We aren’t endorsed by this school

Course

20

Subject

Computer Science

Date

Feb 20, 2024

Type

pdf

Pages

9

Uploaded by SargentSteel13245

Report
1/30/24, 1:09 AM lab 1.2 https://stat20.datahub.berkeley.edu/user/aisharakyan/rstudio/p/2f2e0a1b/ 1/9 ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ✔ dplyr 1.1.3 ✔ readr 2.1.4 ✔ forcats 1.0.0 ✔ stringr 1.5.0 ✔ ggplot2 3.4.4 ✔ tibble 3.2.1 ✔ lubridate 1.9.3 ✔ tidyr 1.3.0 ✔ purrr 1.0.2 ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ── ✖ dplyr::filter() masks stats::filter() ✖ dplyr::lag() masks stats::lag() Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. library (stat20data) library (tidyverse) data (class_survey) ggplot ( data= class_survey, mapping = aes ( x = coding_exp_scale)) + geom_histogram ()
1/30/24, 1:09 AM lab 1.2 https://stat20.datahub.berkeley.edu/user/aisharakyan/rstudio/p/2f2e0a1b/ 2/9 # A tibble: 619 × 1 coding_exp_scale <dbl> 1 1 2 1 3 7 4 6 5 2 6 5 7 4 8 8 9 1 10 5 # 609 more rows library (tidyverse) library (dplyr) coding_experience <- select (class_survey, coding_exp_scale) coding_experience
1/30/24, 1:09 AM lab 1.2 https://stat20.datahub.berkeley.edu/user/aisharakyan/rstudio/p/2f2e0a1b/ 3/9 # A tibble: 1 × 2 coding_experience_IQR coding_experience_median <dbl> <dbl> 1 4 2 `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. summarise (coding_experience, coding_experience_IQR = IQR (coding_exp_scale), coding_experience_median = median (coding_exp_scale)) library (stat20data) library (tidyverse) library (ggplot2) data (class_survey) filtered_survey <- filter (class_survey, new_COVID_variant >= 0 , new_COVID_variant < 1 ) ggplot ( data = filtered_survey, mapping = aes ( x= new_COVID_variant)) + geom_histogram ()
1/30/24, 1:09 AM lab 1.2 https://stat20.datahub.berkeley.edu/user/aisharakyan/rstudio/p/2f2e0a1b/ 4/9 # A tibble: 1 × 1 filtered_survey_sd <dbl> 1 0.222 library (stat20data) data (class_survey) filtered_survey <- filter (class_survey, new_COVID_variant >= 0 , new_COVID_variant < 1 ) summarise (filtered_survey, filtered_survey_sd = sd (new_COVID_variant)) library (stat20data) data (class_survey) filtered_survey <- filter (class_survey, new_COVID_variant >= 0 ,
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help