This repository contains a data analysis exercise for the course An Introduction to the R Programming Language.
The analysis check for potential differences in ultra-processed food consumption among Brazilian children aged 2 to 4 in 2022 between municipalities in clusters B and D of the Revised Multidimensional Index for Sustainable Food Systems (MISFS-R).
The report is available here.
Important
This exercise is for educational purposes only.
The data used in this exercise requires further cleaning and validation before it can be used in real-world applications. For the purposes of this analysis, the data is assumed to be valid, reliable, and to satisfy all assumptions underlying the statistical tests performed, even though this may not hold in practice.
Please note that the results of the statistical tests may not be valid due to these simplifications.
In real-world scenarios, always ensure that the assumptions of statistical tests are rigorously checked and validated before interpreting the results.
The pipeline was developed using the Quarto publishing system, along with the R programming language. To ensure consistent results, the renv package was used to manage and restore the R environment.
After installing the three dependencies mentioned above, follow these steps to reproduce the results:
- Clone this repository to your local machine.
- Open the project in your preferred IDE.
- Restore the R environment by running
renv::restore()in the R console. This will install all required software dependencies. - Open
index.qmdand run the code as described in the report.
After installing all dependencies (see the Usage section), run the following command in the terminal from the project's root directory:
quarto renderThis will start the rendering process. Once complete, the Quarto document will be available in the docs folder.
Contributions are always welcome! Whether you want to report bugs, suggest new features, or help improve the code or documentation, your input makes a difference.
Before opening a new issue, please check the issues tab to see if your topic has already been reported.
To cite this work, please use the following format:
Vartanian, D. (2026). An introduction to the R programming language: Class exercise [Report]. Center for Metropolitan Studies, University of São Paulo.
A BibLaTeX entry for LaTeX users is:
@report{vartanian2026,
title = {An introduction to the R programming language: Class exercise},
author = {{Daniel Vartanian}},
year = {2026},
address = {São Paulo},
institution = {Center for Metropolitan Studies, University of São Paulo},
langid = {en}
Important
The original data sources may be subject to their own licensing terms and conditions.
The code in this repository is licensed under the GNU General Public License Version 3, while the report is available under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.
Copyright (C) 2026 Daniel Vartanian
The code in this report is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
|
|
This work was developed with support from the Center for Metropolitan Studies (CEM) based at the School of Philosophy, Letters and Human Sciences (FFLCH) of the University of São Paulo (USP) and at the Brazilian Center for Analysis and Planning (CEBRAP). |
|
|
This work was financed, in part, by the São Paulo Research Foundation (FAPESP), Brazil. Process Number 2025/17879-2. |
|
|
This work was developed with support from the Sustentarea Research and Extension Group at the University of São Paulo (USP). |
|
|
This work was financed, in part, by the National Council for Scientific and Technological Development (CNPq), Brazil. Process Number 383443/2024-5. |
