I am using the SN65HVD230 breakout module as per the guide, but unlike the MCP_2515, the library in this guide does not seem to provide features such as CAN.init_Mask and CAN.init_Filt.
Welcome! There are several posts on line that may answer your question. Use the Search Forum and look for "CAN BUS message filtering" It may not give you an exact answer but it will give you at least a starting point. The masking should be the same the setup will be different with the R4.
does not look like they have implemented it in the drivers
however looking at section 30 of the user guide for the uC the filter feature is available.
The acceptance filter of CAN is implemented with 8 acceptance masks (one mask for every four mailboxes). Masks independently enabled or disabled for each mailbox. You can try manually write the Mask Registers (MKRk) (k = 0 to 7)
If you have success implementing it from scratch (ie by setting the respective registers for the CAN filtering), please post back an example as a contribution to the community!