Getting Started with ChatGPT and RStudio
摘要
This chapter introduces R and RStudio as essential tools for applying machine learning (ML) in public health. It begins with practical guidance on installation, package management, and dataset handling, providing readers with the foundational skills to engage effectively with health data. The chapter demonstrates how generative AI tools such as ChatGPT can support programming tasks, including code generation, troubleshooting, and clarification of statistical concepts. Through structured hands-on exercises, readers practice scripting, data cleaning, visualization, and analysis in R. Emphasis is placed on reproducibility and workflow design, ensuring that analyses are transparent and replicable. The chapter also highlights best practices for prompt design and responsible integration of GenAI into the learning process, showing how these tools can lower barriers to entry, accelerate skill development, and expand opportunities for applied public health research.