From ripley at stats.ox.ac.uk  Wed Apr 10 11:41:25 2013
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 10 Apr 2013 10:41:25 +0100
Subject: [Rd] Fwd: R unzip method gives filenames as character
In-Reply-To: <CA+MmmT+Hwk4dL+08ZMFnkxA6ejxyK+d0gdueMXV-JDsQQ1ufGA@mail.gmail.com>
References: <515D69C2.8020000@3v.ie>
	<CA+MmmT+Hwk4dL+08ZMFnkxA6ejxyK+d0gdueMXV-JDsQQ1ufGA@mail.gmail.com>
Message-ID: <516533C5.5090505@stats.ox.ac.uk>

On 09/04/2013 09:33, Sean O'Riordain wrote:
> Question: would it be better if the contents list of the unzip() function
> returned the filenames as character rather than factor since they are
> probably unique strings?

That is what the help page says it does, so this is bug -- now corrected 
in R-patched (for one of the methods, only).

>
>> tmp <- unzip(fnam, list=TRUE)
>> str(tmp)
> 'data.frame':   31 obs. of  3 variables:
>   $ Name  : Factor w/ 31 levels "fred1.csv",..: 1 2 3 4 5 6 7 8 9 10 ...
>   $ Length: num  424486 2664277 219798 442383 480857 ...
>   $ Date  : POSIXct, format: "2012-12-01 04:05:00" "2012-12-02 04:06:00"
> "2012-12-03 04:45:00" "2012-12-04 03:52:00" ...
>
> thanks,
> Sean



-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] Fwd: R unzip method gives filenames as character
Prof Brian Ripley