DAT file is a file format written to save sounds, midi, wave, pallets, images, and levels. In short, this file format contains vital information for specific software, and the data is usually in either binary or plain text. In rare cases, DAT files may include a video file. DAT files are opened using text editors like Notepad++ and TextEdit.
M4R is a filename extension for AAC format, which is developed by Apple Inc. It is typically used to save custom iPhone ringtones from Apple iTunes. M4R can only be created from iTunes purchased songs and is usually DRM protected. It can open on iTunes, VLC Media Player, Apple QuickTime Player, and more.