📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      In R, which function reshapes data from long to wide

      format?
      A melt() Correct Answer Incorrect Answer
      B gather() Correct Answer Incorrect Answer
      C spread() Correct Answer Incorrect Answer
      D stack() Correct Answer Incorrect Answer
      E rbind() Correct Answer Incorrect Answer

      Solution

      In tidyr, spread() converts long to wide (older versions). gather() (or pivot_longer) does opposite. Newer pivot_wider() replaces spread().

      Practice Next
      ask-question