Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see https://quarto.org.
Running Code
When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (23): program_id, opeid6, institution_name, institution_control, institu...
dbl (2): Observation_ID, Value
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
student_dropout <-read_csv(file.choose())
Rows: 3 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (1): Variable
dbl (4): N, Mean, Median, SD
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
ai_usage <-read_csv(file.choose())
Rows: 864 Columns: 19
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (17): user_id, age, gender, country, user_type, education_level, profess...
dbl (2): Observation_ID, Value
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# A tibble: 3 × 5
Variable N Mean Median SD
<chr> <dbl> <dbl> <dbl> <dbl>
1 accuracy_rating 274 3.42 3.5 0.857
2 productivity_score 274 5.24 5 1.82
3 satisfaction_score 281 6.13 6 1.53
print(head(ai_usage, 20))
# A tibble: 20 × 19
user_id age gender country user_type education_level profession
<chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 U0269 30 Male United Kingdom Professional Master's Business An…
2 U0269 30 Male United Kingdom Professional Master's Business An…
3 U0269 30 Male United Kingdom Professional Master's Business An…
4 U0217 30 Male United States Professional Bachelor's Customer Su…
5 U0217 30 Male United States Professional Bachelor's Customer Su…
6 U0217 30 Male United States Professional Bachelor's Customer Su…
7 U0152 17 Male Canada Student <NA> Computer Sc…
8 U0152 17 Male Canada Student <NA> Computer Sc…
9 U0152 17 Male Canada Student <NA> Computer Sc…
10 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
11 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
12 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
13 U0263 19 Female Canada Student Undergraduate Biology Stu…
14 U0263 19 Female Canada Student Undergraduate Biology Stu…
15 U0263 19 Female Canada Student Undergraduate Biology Stu…
16 U0225 19 <NA> United States Student Undergraduate Business An…
17 U0225 19 <NA> United States Student Undergraduate Business An…
18 U0225 19 <NA> United States Student Undergraduate Business An…
19 U0246 32 Male france Professional Bachelor's Développeur…
20 U0246 32 Male france Professional Bachelor's Développeur…
# ℹ 12 more variables: monthly_income <chr>, ai_tool <chr>, ai_purpose <chr>,
# ai_usage_hours_per_day <chr>, tasks_performed <chr>, monthly_ai_cost <chr>,
# time_saved_hours_per_week <chr>, work_or_study_hours_per_day <chr>,
# would_recommend <chr>, Observation_ID <dbl>, Variable <chr>, Value <dbl>
# Function to summarize missing valuesmissing_summary <-function(data) { data %>%summarise(across(everything(),~sum(is.na(.x)) ) ) %>%pivot_longer(cols =everything(),names_to ="Variable",values_to ="Missing_Count" )}print(missing_summary(college_clean), n =Inf)
# A tibble: 12 × 4
variable Observation_ID Variable Value
<chr> <int> <chr> <dbl>
1 accuracy_rating 1 n 274
2 accuracy_rating 1 mean 3.42
3 accuracy_rating 1 median 3.5
4 accuracy_rating 1 sd 0.857
5 productivity_score 2 n 274
6 productivity_score 2 mean 5.24
7 productivity_score 2 median 5
8 productivity_score 2 sd 1.82
9 satisfaction_score 3 n 281
10 satisfaction_score 3 mean 6.13
11 satisfaction_score 3 median 6
12 satisfaction_score 3 sd 1.53
print(head(ai_long, 20))
# A tibble: 20 × 20
user_id age gender country user_type education_level profession
<chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 U0269 30 Male United Kingdom Professional Master's Business An…
2 U0269 30 Male United Kingdom Professional Master's Business An…
3 U0269 30 Male United Kingdom Professional Master's Business An…
4 U0269 30 Male United Kingdom Professional Master's Business An…
5 U0269 30 Male United Kingdom Professional Master's Business An…
6 U0269 30 Male United Kingdom Professional Master's Business An…
7 U0217 30 Male United States Professional Bachelor's Customer Su…
8 U0217 30 Male United States Professional Bachelor's Customer Su…
9 U0217 30 Male United States Professional Bachelor's Customer Su…
10 U0217 30 Male United States Professional Bachelor's Customer Su…
11 U0217 30 Male United States Professional Bachelor's Customer Su…
12 U0217 30 Male United States Professional Bachelor's Customer Su…
13 U0152 17 Male Canada Student <NA> Computer Sc…
14 U0152 17 Male Canada Student <NA> Computer Sc…
15 U0152 17 Male Canada Student <NA> Computer Sc…
16 U0152 17 Male Canada Student <NA> Computer Sc…
17 U0152 17 Male Canada Student <NA> Computer Sc…
18 U0152 17 Male Canada Student <NA> Computer Sc…
19 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
20 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
# ℹ 13 more variables: monthly_income <chr>, ai_tool <chr>, ai_purpose <chr>,
# ai_usage_hours_per_day <chr>, tasks_performed <chr>, monthly_ai_cost <chr>,
# time_saved_hours_per_week <chr>, work_or_study_hours_per_day <chr>,
# would_recommend <chr>, variable <chr>, Observation_ID <int>,
# Variable <chr>, Value <dbl>
# A tibble: 20 × 27
user_id age gender country user_type education_level profession
<chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 U0269 30 Male United Kingdom Professional Master's Business An…
2 U0269 30 Male United Kingdom Professional Master's Business An…
3 U0269 30 Male United Kingdom Professional Master's Business An…
4 U0217 30 Male United States Professional Bachelor's Customer Su…
5 U0217 30 Male United States Professional Bachelor's Customer Su…
6 U0217 30 Male United States Professional Bachelor's Customer Su…
7 U0152 17 Male Canada Student <NA> Computer Sc…
8 U0152 17 Male Canada Student <NA> Computer Sc…
9 U0152 17 Male Canada Student <NA> Computer Sc…
10 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
11 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
12 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
13 U0263 19 Female Canada Student Undergraduate Biology Stu…
14 U0263 19 Female Canada Student Undergraduate Biology Stu…
15 U0263 19 Female Canada Student Undergraduate Biology Stu…
16 U0225 19 <NA> United States Student Undergraduate Business An…
17 U0225 19 <NA> United States Student Undergraduate Business An…
18 U0225 19 <NA> United States Student Undergraduate Business An…
19 U0246 32 Male france Professional Bachelor's Développeur…
20 U0246 32 Male france Professional Bachelor's Développeur…
# ℹ 20 more variables: monthly_income <chr>, ai_tool <chr>, ai_purpose <chr>,
# ai_usage_hours_per_day <chr>, tasks_performed <chr>, monthly_ai_cost <chr>,
# time_saved_hours_per_week <chr>, work_or_study_hours_per_day <chr>,
# would_recommend <chr>, variable <chr>, Observation_ID <int>,
# Variable <chr>, Value <dbl>, Row_Number <int>, Min_Rank <int>,
# Dense_Rank <int>, Percent_Rank <dbl>, Previous_Value <dbl>,
# Next_Value <dbl>, Cumulative_Sum <dbl>
# A tibble: 20 × 32
user_id age gender country user_type education_level profession
<chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 U0269 30 Male United Kingdom Professional Master's Business An…
2 U0269 30 Male United Kingdom Professional Master's Business An…
3 U0269 30 Male United Kingdom Professional Master's Business An…
4 U0217 30 Male United States Professional Bachelor's Customer Su…
5 U0217 30 Male United States Professional Bachelor's Customer Su…
6 U0217 30 Male United States Professional Bachelor's Customer Su…
7 U0152 17 Male Canada Student <NA> Computer Sc…
8 U0152 17 Male Canada Student <NA> Computer Sc…
9 U0152 17 Male Canada Student <NA> Computer Sc…
10 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
11 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
12 U0264 35 FEMALE Brazil Professional Bachelor's Desenvolved…
13 U0263 19 Female Canada Student Undergraduate Biology Stu…
14 U0263 19 Female Canada Student Undergraduate Biology Stu…
15 U0263 19 Female Canada Student Undergraduate Biology Stu…
16 U0225 19 <NA> United States Student Undergraduate Business An…
17 U0225 19 <NA> United States Student Undergraduate Business An…
18 U0225 19 <NA> United States Student Undergraduate Business An…
19 U0246 32 Male france Professional Bachelor's Développeur…
20 U0246 32 Male france Professional Bachelor's Développeur…
# ℹ 25 more variables: monthly_income <chr>, ai_tool <chr>, ai_purpose <chr>,
# ai_usage_hours_per_day <chr>, tasks_performed <chr>, monthly_ai_cost <chr>,
# time_saved_hours_per_week <chr>, work_or_study_hours_per_day <chr>,
# would_recommend <chr>, variable <chr>, Observation_ID <int>,
# Variable <chr>, Value <dbl>, Row_Number <int>, Min_Rank <int>,
# Dense_Rank <int>, Percent_Rank <dbl>, Previous_Value <dbl>,
# Next_Value <dbl>, Cumulative_Sum <dbl>, Variable_Mean <dbl>, …