ยินดีด้วย

Introduction to Writing Functions in R

Richie Cotton

Data Evangelist at DataCamp

สิ่งที่เรียนในบทที่ 1

  • การเขียนฟังก์ชันเองช่วยให้นำโค้ดกลับมาใช้ใหม่ได้
  • มีกระบวนการง่ายๆ สำหรับแปลง script ให้เป็นฟังก์ชัน
  • อาร์กิวเมนต์ข้อมูลควรอยู่ก่อนอาร์กิวเมนต์รายละเอียด
Introduction to Writing Functions in R

สิ่งที่เรียนในบทที่ 2

  • กำหนดค่าเริ่มต้นด้วยไวยากรณ์ name = value
  • ส่งอาร์กิวเมนต์ระหว่างฟังก์ชันโดยใช้ชื่อหรือ ...
  • ตรวจสอบ input ของผู้ใช้ได้ด้วย assertive
Introduction to Writing Functions in R

สิ่งที่เรียนในบทที่ 3

  • ออกจากฟังก์ชันได้ก่อนถึงจุดสิ้นสุดด้วย return()
  • ป้องกันไม่ให้พิมพ์ค่าที่ return ด้วย invisible()
  • ฟังก์ชันสามารถ return ค่าได้หลายค่าผ่าน list หรือ attribute
  • R มีกฎเกี่ยวกับ scope ที่กำหนดว่าตัวแปรใดมองเห็นได้
Introduction to Writing Functions in R

สิ่งที่เรียนในบทที่ 4

  • การเขียนฟังก์ชันเองมีประโยชน์สำหรับการวิเคราะห์ข้อมูล
  • แม้แต่ฟังก์ชันง่ายๆ บรรทัดเดียวก็มีประโยชน์ได้
Introduction to Writing Functions in R

การสร้างโมเดลเพิ่มเติม

Logistic Regression ครอบคลุมใน

  • Introduction to Regression in R
  • Intermediate Regression in R
  • Generalized Linear Models in R

Generalized additive models ครอบคลุมใน

  • Nonlinear Modeling in R with GAMs
Introduction to Writing Functions in R

การจัดระเบียบโมเดล

การจัดระเบียบโมเดลด้วย broom ครอบคลุมใน

  • Case Study: Exploratory Data Analysis in R
  • Machine Learning in the Tidyverse
  • Reshaping Data with tidyr
Introduction to Writing Functions in R

Unit testing

Unit testing โค้ดครอบคลุมใน

  • Developing R Packages
Introduction to Writing Functions in R

Environment

Environment ครอบคลุมใน

  • Object-Oriented Programming with S3 and R6 in R
Introduction to Writing Functions in R

ขอบคุณที่เรียนคอร์สนี้!

Introduction to Writing Functions in R

Preparing Video For Download...