Using R, I am trying to populate an empty data frame with calculation results based on data from another dataset.
However, due to the large amount of data, I want to have a loop that can loop through the years and countries. For example:
EU[which(EU$Country=="Austria"),which(colnames(EU)=="eu_enei_13")] = filter(eurostat, TIME==2013 & GEO=="Austria" & NACE_R2=="Total - all NACE activities" & INDIC_PEFA=="Extraction of natural energy inputs")[,which(colnames(eurostat)=="Value")]
where eu_enei_13 is a calculation result, EU is the empty data frame and eurostat is the source dataset.
Please give me some advice.
Recently Asked Questions
- I am having a difficult time figuring out how to code this assignment. Please help! Exercise 4.12: Write an application that calculates the product of the odd
- Which most accurately describes a factor that helps explain developmental trends toward extrinsically motivated learning?
- Please refer to the attachment to answer this question. This question was created from CH14 UML.pdf. Additional comments: ""14-2" Identify a set of major use