When I try and compile the code in post #1 with Uno R4 wifi (or R4 minima) I get this error, even when using the 1.27 version of the library.
C:\Users\Owner\Documents\Arduino\libraries\VirtualWire\VirtualWire.cpp:16:12: fatal error: util/crc16.h: No such file or directory
#include <util/crc16.h>
I think you are running into a fundamental compiler issue as util/crc16.h is part of the avr-libc standard libraries for the gcc compiler.
https://www.nongnu.org/avr-libc/user-manual/group__util__crc.html
The Uno R4 has a renesas processor and is compiled with the arm-none-eabi-gcc\7-2017q4
compiler. It does not implement a crc16 routine.
I'm not certain what you will need to do to run virtual wire on the R4 and if indeed it can be done as there are timer issues as well as the crc issue,
Radio Head is does not list the R4 as one of the supported platforms in RadioHead.h
A range of platforms is supported:
///
/// - Arduino and the Arduino IDE (version 1.0 to 1.5.5 and later)
/// Including Diecimila, Uno, Mega, Leonardo, Yun etc. http://arduino.cc/, Also similar boards such as
/// - Moteino http://lowpowerlab.com/moteino/
/// - Anarduino Mini http://www.anarduino.com/mini/
/// - RedBearLab Blend V1.0 http://redbearlab.com/blend/ (with Arduino 1.0.5 and RedBearLab Blend Add-On version 20140701)
/// - etc.
///
/// - ChipKit Uno32 board and the MPIDE development environment
/// http://www.digilentinc.com/Products/Detail.cfm?Prod=CHIPKIT-UNO32
///
/// - Maple and Flymaple boards with libmaple and the Maple-IDE development environment
/// Maple | LeafLabs and Welcome to the OpenDrone Community! - OpenDrone
///
/// - Teensy including Teensy 3.1 and earlier built using Arduino IDE 1.0.5 with
/// teensyduino addon 1.18 and later.
/// Teensy USB Development Board
///
/// - ATtiny built using Arduino IDE 1.0.5 with the arduino-tiny support from Google Code Archive - Long-term storage for Google Code Project Hosting.
/// (Caution: these are very small processors and not all RadioHead features may work, depending on memory requirements)
///
/// Other platforms are partially supported, such as Generic AVR 8 bit processors, MSP430.
/// We welcome contributions that will expand the range of supported platforms.