preparing dataset for tidyHeatmap

MALDI NY AMB FCY ECN KCA CLO MIC ITR VOR FLU

1 C. albicans 2 1 1 1 1 1 1 1 1 1
2 C. albicans 2 1 1 1 1 1 1 1 1 1
3 C. albicans 2 1 1 1 1 1 1 1 1 1
4 C. albicans 1 1 1 1 1 1 1 1 1 1
5 C. albicans 1 1 1 1 2 2 1 1 1 1
6 C. albicans 2 1 1 1 1 1 1 1 1 1
This is my dataset....and I want to create a heatmap and dendrogram MALDI vs all others columns.... I wrote following code:
MALDI_tidy1 <-
bazaRmarina1 |>
as_tibble(rownames="MALDI") |>

# Scale
mutate_at(rownames="MALDI", Property) |>

# tidyfy
pivot_longer(cols = -c("MALDI"), names_to = "Property")

MALDI_tidy1
AND GOT THIS MASSAGE
Error in mutate_at():
! .vars must be a character/numeric vector or a vars() object, not a double matrix.
Run rlang::last_trace() to see where the error occurred.
Please, any suggestion?

You might need quotes around "Property".

If that's not the problem, we'll need a reprex to understand.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.