Skip to content

Commit

Permalink
Update Heatmap_tutorial.md
Browse files Browse the repository at this point in the history
Small edits to improve versatility
  • Loading branch information
cxli233 authored Nov 16, 2023
1 parent 035cb3e commit 186183a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Heatmap_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ my_data_reordered <- my_data %>%
mutate(col = reorder(col, -n)) %>% # this reorders the columns
select(-n) %>%
inner_join(my_data_peak_values_reordered, by = "row") %>%
mutate(row = reorder(row, n)) # this reorders the rows
mutate(peaked_at = reorder(peaked_at, n)) %>%
mutate(order_rows = as.numeric(peaked_at)) %>%
mutate(row = reorder(row, order_rows)) # this reorders the rows by the "peaked_at" column.
head(my_data_reordered)
Expand Down

0 comments on commit 186183a

Please sign in to comment.