Notice
Recent Posts
Recent Comments
Links
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Today
In Total
관리 메뉴

A Joyful AI Research Journey🌳😊

A summary sheet of common tidyverse functions in R 본문

🌳Coursework Highlights🪄✨/Data Analytics and Visualisation

A summary sheet of common tidyverse functions in R

yjyuwisely 2025. 3. 29. 05:00

ChatGPT, OpenAI


A summary sheet of common tidyverse functions in R, grouped by their function types such as transforming, filtering, summarising, filling, etc. This will help you quickly recognise which function does what in dplyr and tidyr.


🧾 Tidyverse Function Types Summary


🔄 Transforming

Functions that change the structure, order, or content of a dataset without summarising it.

  • mutate() – Add or modify columns
  • transmute() – Like mutate(), but only returns the new columns
  • arrange() – Sort rows
  • rename() – Rename column names
  • relocate() – Move columns to a new position

🔍 Filtering/Subsetting

Functions that reduce the number of rows based on a condition.

  • filter() – Keep rows matching a condition
  • slice() – Select rows by position (e.g. top 5)
  • distinct() – Remove duplicate rows

🧮 Summarising

Functions that condense data, often after grouping.

  • summarise() – Create summary statistics (e.g. mean, count)
  • count() – Tally the number of observations per group

🧩 Grouping

Used before summarising or operating within categories.

  • group_by() – Group data by one or more variables
  • ungroup() – Remove grouping

📦 Joining/Combining

Combine multiple datasets based on keys.

  • inner_join(), left_join(), right_join(), full_join() – Join datasets
  • bind_rows() – Stack datasets vertically
  • bind_cols() – Combine datasets side-by-side

🔧 Filling / Tidying

Help prepare, reshape, or complete datasets.

  • complete() – Fill in missing combinations (Filling)
  • fill() – Fill missing values downward or upward (Filling)
  • pivot_longer() – Convert wide to long format
  • pivot_wider() – Convert long to wide format
  • separate() – Split a column into multiple columns
  • unite() – Combine multiple columns into one

🌳 Nesting

Used for working with grouped or hierarchical data.

  • nest() – Create a nested dataframe
  • unnest() – Flatten a nested dataframe
728x90
반응형
Comments