Extracting multiple values from list and storing them in data frame using R?

المشرف العام

Administrator
طاقم الإدارة
I have a list of 3 SpatialPolygonsDataFrames. Every element has a number which is the perimeter. I want through a loop to store the numbers into one cell of a data frame like: 154,526,442. I tried to do that like this (in R):

for (i in 1:3){ if (i ==1){ datafr$perimeter[1]=mylist[]@data$perim }else{ datafr$perimeter[1]=mylist[[1]]@data$perim;mylist[]@data$perim } }from this I only get the perimeter of the first element. How can I store all my values without loosing the previous one every time?



أكثر...
 
أعلى