Splitting by multiple groups
gdp_by_industry_oceania contains the GDP generated by the agriculture and tourism industries in both 1995 and 2010. Your goal is to create a wide format data.table containing columns of GDP for each year and industry.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Joining Data with data.table in R
अभ्यास निर्देश
- Print
gdp_by_industry_oceania. - Convert
gdp_by_industry_oceaniato a wide format with each country as a row, splitting the"gdp"column so that the result has columns containing the gdp for each industry and each year.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Split gdp by industry and year
___