"Period", "cell_id", "daterank"및 "timerank"의 4 가지 변수가있는 데이터 프레임이 있습니다. 개별 기간별로 각 날짜와 각 시간마다 셀 ID (주기적으로 115 개의 고유 한 레벨 (또는 cell_id)가 있음)의 빈도를 얻고 싶습니다. "기간"은 개인을위한 숫자 ID (5 개인) 는 "daterank는"값을 갖는다 0-29 "timerank은"값이 1-24지도에 공간 격자 내 세포 (대 "cell_id"이다 숫자 식별자). 예제 값은 101102103104105201..205,2401..2405입니다.R : 각 날짜와 시간별 빈도 계산 방법
유일한 방법 지금까지 IS를 수행하는 방법을 알 수 있습니다
####get data by period######2051, 2483, 2507, 2627, 2723###
##tag2051##
tag2051 = subset(fr10000, Period=="2051") ###where fr10000 is the object
head(tag2051)
(d11 = subset(tag2051, daterank=="11"))
###here, I have to go through each daterank and
timerank combination = wate of time!!
t11h2= subset(d11, timerank=="2")
t11h2
frqt11h2= table(t11h2$cell_id)
cbind(frqt11h2)
내가 각각 "daterank"와 "하여 각"timerank "를"cell_id "의 주파수를 얻을 수있는 방법이 있나요 기간 "을 계속 변경하지 않고 daterank 및 timerank 값을 수동으로 입력 하시겠습니까?
'plyr' 패키지를 확인하십시오.이 태스크에 대해 정확하게 설계되었습니다 –
이 질문을보십시오 : http://stackoverflow.com/questions/18137896/r-max-value-over-a-series -of-days? noredirect = 1 # comment26564547_18137896 –