remove(list=ls())
My first quarto document
Introduction
This is the first time I am showing how to use qmd file to BCE Data Analysis 2025 class.
Show them how to
Install a package (required only once)
Load a package (in every session)
Render/compile a document
Type an equation
\[ y_i = \beta_0 + \beta_1 x_i + \epsilon_i \]
\[ E=mc^2 \]
Code
2 * 4 # multiplication
[1] 8
2 ** 4 # exponentiate
[1] 16
Lets explore the datasets
package with ?
command.
?datasetslibrary(help = "datasets")
From a survey of the clerical employees of a large financial organization, the data are aggregated from the questionnaires of the approximately 35 employees for each of 30 (randomly selected) departments. The numbers give the percent proportion of favourable responses to seven questions in each department.
rating | numeric | Overall rating | |
complaints | numeric | Handling of employee complaints | |
privileges | numeric | Does not allow special privileges | |
learning | numeric | Opportunity to learn | |
raises | numeric | Raises based on performance | |
critical | numeric | Too critical | |
advance | numeric | Advancement |
?attitude summary(attitude)
rating complaints privileges learning raises
Min. :40.00 Min. :37.0 Min. :30.00 Min. :34.00 Min. :43.00
1st Qu.:58.75 1st Qu.:58.5 1st Qu.:45.00 1st Qu.:47.00 1st Qu.:58.25
Median :65.50 Median :65.0 Median :51.50 Median :56.50 Median :63.50
Mean :64.63 Mean :66.6 Mean :53.13 Mean :56.37 Mean :64.63
3rd Qu.:71.75 3rd Qu.:77.0 3rd Qu.:62.50 3rd Qu.:66.75 3rd Qu.:71.00
Max. :85.00 Max. :90.0 Max. :83.00 Max. :75.00 Max. :88.00
critical advance
Min. :49.00 Min. :25.00
1st Qu.:69.25 1st Qu.:35.00
Median :77.50 Median :41.00
Mean :74.77 Mean :42.93
3rd Qu.:80.00 3rd Qu.:47.75
Max. :92.00 Max. :72.00
Conclusion
Yay !
- We were able to type our first equation !