R tutorial: Switching long format data to wide format, and wide format to long format

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • In this video I demonstrate how you can make wide format data long form and vice versa. I do this using the pivot functions in the tidyverse package. I'll also show you how you can add prefixes to column titles
    Data and code can be found here: drive.google.c...

Комментарии • 1

  • @linah.2655
    @linah.2655 2 месяца назад

    Thanks for the video!
    I have a question: I currently have an Excel file with a list of companies and their ISINs. There are also columns that show the ESG score, environmental score, social score and governance score for the years 2002 to 2023. For example, one column is called "ESG score (FY 2002)"
    However, I would like the columns to show only the year (2002-2023) and also add a column containing the "ESG datatype". So whether it is the esg score, environment score etc.
    Do you have any idea how I can implement this?