socialmixr icon indicating copy to clipboard operation
socialmixr copied to clipboard

Create a common contact data class across packages

Open Bisaloo opened this issue 2 years ago • 4 comments

I think the different packages fill different niches and it's good to keep them all alive (especially since they are already on CRAN).

However, we should make sure that they play well together and that it is easy for users to go from one to the other.

It might also be useful to provide a shared S3 class for contact matrices so we can write common methods.

See also: https://github.com/Bisaloo/contactdata/issues/2

Bisaloo avatar Sep 07 '22 07:09 Bisaloo

I think the two packages fill 2 different niches and it's good to keep them both alive (especially since both of them are already on CRAN).

I'm not 100% convinced that they need to be separate but if yes then it would indeed be a great idea to streamline the interface to be similar. We might also want to consider whether they could be named better to make the distinction clearer (as socialmixr handles "contact data" and contacdata provides estimates of social mixing).

It might also be useful to provide a shared S3 class for contact matrices so we can write common methods.

That is a good idea I think.

sbfnk avatar Sep 14 '22 19:09 sbfnk

Outcome from the discussion that happened on slack:

It looks we heading towards a separate package which will provide a constructor and other methods (print(), plot(), accessor functions, etc.) for the S3 class we defined.

The maintainers of the individual packages keep the responsibility to convert their objects to the common class.

This means we should probably sync with conmat devs to see if:

  • they would be willing to eventually update their package to use the common class
  • they already have opinions on how we should build the class.

Bisaloo avatar Oct 11 '22 13:10 Bisaloo

Hi there :wave:

Just chiming in to notify myself of this discussion, and also tagging in the other conmat devs, @goldingn, and @aarathybabu97

njtierney avatar Oct 21 '22 09:10 njtierney

As above. Commenting for notifications on progress here.

TimTaylor avatar Oct 25 '22 10:10 TimTaylor