I'm struggling with this error about few hours. I'm not sure how to explain my problem well.
the situation is I was preprocessing some 18 cities' overall excel data by year
for example variable1(numeric) variable2(numeric)
year reg ....
2001 11 ...
2002 21 ...
2I03 22
2004 32
I want to divide by cities, make new variable which represents each variable's average. after that, make new excel sheet city by city.
so... i typed
for(i in 2:3){
for(k in 1:9){
raw_ik <- raw_data %>%
filter(reg==ik)
raw_ik_mean <- raw_data%>%
filter(reg==ik) %>%
summarise(mean_grGo = mean(grGo))
ik<- bind_rows(raw_ik,raw_ik_mean)
}
}
but, Error in filter_impl(.data, quo) : Result must have length 259, not 399
Thanks in advance.