title: Determine file type in R based on the content
body: <p>In linux we can use <a href="http://linux.about.com/library/cmd/blcmdl1_file.htm" rel="noreferrer"><code>file</code></a> command to get the file type based on the content of the file (<strong>not extension</strong>). Is there any similar function in R?</p>