Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205330

Troubleshooting duplicate couples (id-time) in resulting pdata.frame

$
0
0

I have the following error code: duplicate couples (id-time) in resulting pdata.frame when I want to create my panel data.

I already know that there are sometimes two duplicate couples but I just don't know how to fix it? Anyone an idea?

pdata <- pdata.frame(TestTable, index= c("id","date"))
table(index(pdata), useNA = "ifany")

we see that on some dates there are two couples → between 0 and 2

View(table(index(pdata), useNA = "ifany")) 

check again if duplicate couples exist --> TRUE

any(table(index(pdata), useNA = "ifany") > 1)

Viewing all articles
Browse latest Browse all 205330

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>