[R] can't open file

Sebastian Kruk residuo.solow at gmail.com
Wed Jul 7 16:45:07 CEST 2010


In both cases I obtain:

01/02/70
01/03/70
01/04/70
01/05/70
01/06/70
01/07/70
01/08/70
01/09/70
01/10/70
01/11/70
01/12/70
01/13/70
01/14/70
01/15/70
01/16/70
01/17/70
01/18/70
01/19/70
01/20/70
01/21/70
01/22/70
01/23/70
01/24/70
01/25/70
01/26/70
01/27/70
01/28/70
01/29/70
01/30/70
01/31/70
02/01/70
02/02/70
02/03/70
02/04/70
02/05/70
02/06/70
02/07/70
02/08/70
02/09/70
02/10/70
02/11/70
02/12/70
02/13/70
02/14/70
02/15/70
02/16/70
02/17/70
02/18/70
02/19/70
02/20/70
02/21/70
02/22/70
02/23/70
02/24/70
02/25/70
02/26/70
02/27/70
02/28/70
03/01/70
03/02/70
03/03/70
03/04/70
03/05/70
03/06/70
03/07/70
03/08/70
03/09/70
03/10/70
03/11/70
03/12/70
03/13/70
03/14/70
03/15/70
03/16/70
03/17/70
03/18/70
03/19/70
03/20/70
03/21/70
03/22/70
03/23/70
03/24/70
03/25/70
03/26/70
03/27/70
03/28/70
03/29/70
03/30/70
03/31/70
04/01/70
04/02/70
04/03/70
04/04/70
04/05/70
04/06/70
04/07/70
04/08/70
04/09/70
04/10/70
04/11/70
04/12/70
04/13/70
04/14/70
04/15/70
04/16/70
04/17/70
04/18/70
04/19/70
04/20/70
04/21/70
04/22/70
04/23/70
04/24/70
04/25/70
04/26/70
04/27/70
04/28/70
04/29/70
04/30/70
05/01/70
05/02/70
05/03/70
05/04/70
05/05/70
05/06/70
05/07/70
05/08/70
05/09/70
05/10/70
05/11/70
05/12/70
05/13/70
05/14/70
05/15/70
05/16/70
05/17/70
05/18/70
05/19/70
05/20/70
05/21/70
05/22/70
05/23/70
05/24/70
05/25/70
05/26/70
05/27/70
05/28/70
05/29/70
05/30/70
05/31/70
06/01/70
06/02/70
06/03/70
06/04/70
06/05/70
06/06/70
06/07/70
06/08/70
............

2010/7/7 Gabor Grothendieck <ggrothendieck en gmail.com>:
> On Wed, Jul 7, 2010 at 9:16 AM, Sebastian Kruk <residuo.solow en gmail.com> wrote:
>> I have a text file log2.log encoded Ansi in Windows.
>>
>> When I execute:
>>
>> out <- read.zoo(readLines(con <- file("log2.log",
>> encoding="UCS-2LE")),FUN = as.chron)
>>
>> have errors:
>>
>> Error en file(file, "rt") : no se puede abrir la conexión
>> Además: Mensajes de aviso perdidos
>> 1: In file(file, "rt") :
>>  sólo fue usado el primer elemento del argumento 'description'
>> 2: In file(file, "rt") :
>>  no fue posible abrir el archivo '#Software: Microsoft Internet
>> Information Services 5.0': No such file or directory
>>
>> Why?
>>
>
> The file argument of read.zoo is a character string giving the *name*
> of the file, not the contents of the file as a vector of character
> strings.  Alternately it can be a connection (undocumented but works)
> or a data.frame so you likely want one of these:
>
> read.zoo(file("log2.log", encoding="UCS-2LE"), FUN = as.chron)
> read.zoo("log2.log", FUN = as.chron)
>
> See the examples section of ?read.zoo for more examples.
>



More information about the R-help mailing list