It looks like pivot_longer() works like stack() so pivoting by rows. In contrast gather splitting data by columns. How I could specify
pivot_longer()
stack()
gather