grattan / covid19.model.sa2

4 stars 0 forks source link

export as data.table with setkey #18

Closed wfmackey closed 4 years ago

HughParsonage commented 4 years ago

Haven't fully checked out but I think we're missing the sortedness of hid and pid. We need both nested sortedness and discrete sortedness. That is

is.unsorted(australia$state)
is.unsorted(australia$sa2)
is.unsorted(australia$hid)
is.unsorted(australia$pid)

Should all return FALSE. I think pid and hid are created too early for this to occur.

wfmackey commented 4 years ago

They are all not unsorted:

> aus <- read_fst("inst/extdata/australia.fst")
> is.unsorted(aus$state)
[1] FALSE
> is.unsorted(aus$sa2)
[1] FALSE
> is.unsorted(aus$hid)
[1] FALSE
> is.unsorted(aus$pid)
[1] FALSE