2-4 For the next several questions, we will be using the Boston Marathon data set again.…
- User
2-4
For the next several questions, we will be using the Boston Marathon data set again. The following code chunk reads in the TIM.txt data file (you may need to adjust the path to the data), and makes the following modifications to the data frame.
The following variables are renamed:
bib=BibNumand changed to a character typeyear=Yearage=Agegender=Gender1F2M, change 1 to F and 2 to M
These variables are removed:
StartHr,StartMin,HalfMar,Age2014Also, the data set is filtered to only include the years 2011 and 2012 (i.e., observations from 2013 are removed).
tim = read_table("../../data/TIM.txt", guess_max = 20000) %>% rename(bib = BibNum, year = Year, age = Age, gender = Gender1F2M) %>% mutate(bib = as.character(bib), gender = case_when( gender == 1 ~ "F", gender == 2 ~ "M" )) %>% select(-c(StartHr,StartMin,HalfMar, "Age2014")) %>% filter(year != 2013)── Column specification ────────────────────────────────────────── cols( BibNum = col_double(), Year = col_double(), Age = col_double(), Gender1F2M = col_double(), StartHr = col_double(), StartMin = col_double(),
K0-5= col_double(),K5-10= col_double(),K10-15= col_double(),K15-20= col_double(),K20-25= col_double(),K25-30= col_double(),K30-35= col_double(),K35-40= col_double(),K40-Fin= col_double(), HalfMar = col_double(), Age2014 = col_double() )R version 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64
R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.
knitr::opts_chunkset(echo = TRUE, message=FALSE, fig.height = 3) library(tidyverse) source("../../scripts/ggprob.R") library(dplyr) library(ggplot2)
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.