The dqmagic package provides an R interface for the libmagic file type identification library similar to the Unix file command. This allows for file type identification based on a file's content instead of it's extension.

See also