Skip to content
Back to formatted view

Raw Message

Message-ID: <CAPtbhHyCnO0vg233mO7W-fDmTY9mOzCZWWMLhkazY64GE8zsxw@mail.gmail.com>
Date: 2013-01-14T19:25:11Z
From: Suzen, Mehmet
Subject: readJPEG function cannot open jpeg files
In-Reply-To: <50F446B0.50401@stats.ox.ac.uk>

On 14 January 2013 18:56, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> On 14/01/2013 16:26, Suzen, Mehmet wrote:
>>
>> Similar issue with URLs:
>
>
> Not a similar issue at all: a URL is not a file.  That most functions in R
> itself open connections including URLs does not mean that contributed
> packages do.  The package help is quite specific about its requirements.
>
>   source: Either name of the file to read from or a raw vector
>           representing the JPEG file content.
>
> Which suggests to you how you can do this, apart from download.file, of
> course.  Something like
>
> readJPEG(readBin(yesWeCan, "raw", 1e6))
>

 Dear Prof. Ripley,

Thank you for the correction. I was thinking in the lines of
'Everything is a file' concept.
(http://en.wikipedia.org/wiki/Everything_is_a_file).

Best,
-m