ich bin neu hier im Forum und habe ein großes Problem mit meiner Masterarbeit.
Ich muss mit Daten, die ich aus Refinitv Eikon extrahiert habe, eine Datenanalyse mit R durchführen. Allerdings entspricht das Format des Excel-Datensatzes aus Refinitv Eikon nicht dem Format, das ich für die Verarbeitung mit R benötige.
Der Datensatz aus Eikon ist im Wide Format, wie in Abbildung 1 zu sehen ist. Ich habe insgesamt 9 Variablen, die alle den Zeitraum von 2010 bis 2023 abdecken. Der Datensatz ist also riesig.
Für die Verarbeitung mit R benötige ich den Datensatz im Format wie in Abbildung 2 dargestellt, mit dem Zusatz, dass ich eine neue Spalte mit den Jahren 2010-2023 benötige.
Meine Versuche, den Datensatz mit R zu bearbeiten, sehen wie folgt aus:
Code: Alles auswählen
dfNEU <- reshape(data = df,
varying = c("ESG Score(FY2010)", "ESG Score(FY2011)", "ESG Score(FY2012)", "ESG Score(FY2013)", "ESG Score(FY2014)", "ESG Score (FY2015)", "ESG Score (FY2016)", "ESG Score(FY2017)", "ESG Score(FY2018)", "ESG Score(FY2019)", "ESG Score(FY2020)", "ESG Score(FY2021)", "ESG Score(FY2022)", "ESG Score(FY2023)", "Total Assets(FY2010, EUR)", "Total Assets(FY2011, EUR)", "Total Assets(FY2012, EUR)", "Total Assets(FY2013, EUR)", "Total Assets(FY2014, EUR)", "Total Assets(FY2015, EUR)", "Total Assets(FY2016, EUR)", "Total Assets(FY2017, EUR)", "Total Assets(FY2018, EUR)", "Total Assets(FY2019, EUR)", "Total Assets(FY2020, EUR)", "Total Assets(FY2021, EUR)", "Total Assets(FY2022, EUR)", "Total Assets(FY2023, EUR)", "Debt - Total(FY2010, EUR)", "Debt - Total(FY2011, EUR)", "Debt - Total(FY2012, EUR)", "Debt - Total(FY2013, EUR)", "Debt - Total (FY2014, EUR)", "Debt - Total(FY2015, EUR)", "Debt - Total(FY2016, EUR)", "Debt - Total(FY2017, EUR)", "Debt - Total(FY2018, EUR)", "Debt - Total (FY2019, EUR)", "Debt - Total(FY2020, EUR)", "Debt - Total(FY2021, EUR)", "Debt - Total(FY2022, EUR)", "Debt - Total(FY2023, EUR)", "Income before Taxes(FY2010, EUR)", "Income before Taxes(FY2011, EUR)", "Income before Taxes(FY2012, EUR)", "Income before Taxes(FY2013, EUR)", "Income before Taxes(FY2014, EUR)", "Income before Taxes(FY2015, EUR)", "Income before Taxes(FY2016, EUR)", "Income before Taxes(FY2017, EUR)", "Income before Taxes(FY2018, EUR)", "Income before Taxes(FY2019, EUR)", "Income before Taxes(FY2020, EUR)", "Income before Taxes(FY2021, EUR)", "Income before Taxes(FY2022, EUR)", "Income before Taxes(FY2023, EUR)", "Inventories - Total(FY2010, EUR)", "Inventories - Total(FY2011, EUR)", "Inventories - Total(FY2012, EUR)", "Inventories - Total (FY2013, EUR)", "Inventories - Total(FY2014, EUR)", "Inventories - Total(FY2015, EUR)", "Inventories - Total(FY2016, EUR)", "Inventories - Total (FY2017, EUR)", "Inventories - Total(FY2018, EUR)", "Inventories - Total(FY2019, EUR)", "Inventories - Total(FY2020, EUR)", "Inventories - Total (FY2021, EUR)", "Inventories - Total(FY2022, EUR)", "Inventories - Total(FY2023, EUR)", "Property Plant & Equipment - Net - Total(FY2010, EUR)", "Property Plant & Equipment - Net - Total(FY2011, EUR)", "Property Plant & Equipment - Net - Total(FY2012, EUR)", "Property Plant & Equipment - Net - Total(FY2013, EUR)", "Property Plant & Equipment - Net - Total (FY2014, EUR)" "Property Plant & Equipment - Net - Total(FY2015, EUR)", "Property Plant & Equipment - Net - Total(FY2016, EUR)", "Property Plant & Equipment - Net - Total(FY2017, EUR)", "Property Plant & Equipment - Net - Total(FY2018, EUR)", "Property Plant & Equipment - Net - Total (FY2019, EUR)", "Property Plant & Equipment - Net - Total(FY2020, EUR)", "Property Plant & Equipment - Net - Total(FY2021, EUR)", "Property Plant & Equipment - Net - Total(FY2022, EUR)", "Property Plant & Equipment - Net - Total(FY2023, EUR)", "Research & Development Expense(FY2010, EUR)", "Research & Development Expense(FY2011, EUR)", "Research & Development Expense(FY2012, EUR)", "Research & Development Expense(FY2013, EUR)", "Research & Development Expense(FY2014, EUR)", "Research & Development Expense(FY2015, EUR)", "Research & Development Expense(FY2016, EUR)", "Research & Development Expense(FY2017, EUR)" "Research & Development Expense(FY2018, EUR)", "Research & Development Expense(FY2019, EUR)", "Research & Development Expense(FY2020, EUR)", "Research & Development Expense(FY2021, EUR)", "Research & Development Expense(FY2022, EUR)", "Research & Development Expense (FY2023, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2010, EUR)", "Income Taxes - Payable - Long-Term & Short-Term (FY2011, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2012, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2013, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2014, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2015, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2016, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2017, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2018, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2019, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2020, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2021, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2022, EUR)", "Income Taxes - Payable - Long-Term & Short-Term(FY2023, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2010, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2011, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2012, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2013, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2014, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2015, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2016, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2017, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2018, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2019, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2020, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2021, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2022, EUR)", "Earnings before Interest & Taxes (EBIT)(FY2023, EUR)",
idvar = c("Identifier", "Company Name", "Country of Headquarters", "TRBC Industry Name"),
timevar = "year",
v.names = c("ESG", "Total Assets", "Total Debt", "Income Before Taxes", "Inventories", "PPE", "R&D Expense", "Income Taxes Payable", "EBIT"),
times = c(2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023),
direction = "long",
)
Ich hoffe ich konnte mein Problem erklären.
Ich freue mich auf rege Teilnahme und auf eure Nachrichten.
Viele Grüße
Pete