Re: [R] detect filetype (as in unix 'file')

2011-04-05 Thread Jeroen Ooms
No, but what is wrong with using system()? The application is running in a very sandboxed environment and might not have permission to execute 'file'. 'file' is large and complex because it tries to be comprehensive (but it still does not know about some common systems, e.g. 64-bit Windows

Re: [R] detect filetype (as in unix 'file')

2011-04-04 Thread Prof Brian Ripley
On Sun, 3 Apr 2011, Jeroen Ooms wrote: Is there a way in R (in Linux) to detect the type of a file without invoking a shell? E.g to do this: system(file density.plot) density.plot: PDF document, version 1.4 but without using system()? I tried file() and file.info(), but both do display the

[R] detect filetype (as in unix 'file')

2011-04-03 Thread Jeroen Ooms
Is there a way in R (in Linux) to detect the type of a file without invoking a shell? E.g to do this: system(file density.plot) density.plot: PDF document, version 1.4 but without using system()? I tried file() and file.info(), but both do display the information I am looking for. -- View