Now you look for error messages that tell you WHY 'cant compile for wemos d1 r2'. The messages are in the text box just below your sketch. If you can't figure out what they are telling you, copy all the text from that text box and paste it in a reply here.