[R] Bug (?) in read.fwf

david.jessop at ubs.com david.jessop at ubs.com
Mon Nov 12 20:50:25 CET 2007


Jim,

That works - thank you; but still doesn't explain why stringsAsFactors
doesn't seem to have an effect. 

Regards,

David
 

-----Original Message-----
From: jim holtman [mailto:jholtman at gmail.com] 
Sent: 08 November 2007 13:41
To: Jessop, David
Cc: r-help at r-project.org
Subject: Re: [R] Bug (?) in read.fwf

have you tried  "as.is=TRUE"

On Nov 8, 2007 6:20 AM,  <david.jessop at ubs.com> wrote:
> Hi,
>
> I'm trying to use read.fwf
>
>        temp = read.fwf ("Raw data.txt", widths = c (11, 21, 10, rep 
> (16, 6)) ,skip = 2, n = 2, stringsAsFactors = FALSE, strip.white = 
> TRUE)
>
> but no matter what I do the strings are turned into factors.  I 
> believe it's the "n=2" parameter that causes the problem as it seems 
> to work without this.  Am I missing something?
>
> Thanks in advance,
>
> David Jessop
>
>
> Issued by UBS AG or affiliates to professional investors for 
> information only and its accuracy/completeness is not guaranteed.
> All opinions may change without notice and may differ to 
> opinions/recommendations expressed by other business areas of UBS.
> UBS may maintain long/short positions and trade in instruments 
> referred to. Unless stated otherwise, this is not a personal 
> recommendation, offer or solicitation to buy/sell and any 
> prices/quotations are indicative only. UBS may provide investment 
> banking and other services to, and/or its employees may be directors 
> of, companies referred to. To the extent permitted by law, UBS does 
> not accept any liability arising from the use of this communication.
>
>  (c) 2007 UBS.  All rights reserved. Intended for recipient only and 
> not for further distribution without the consent of UBS.
>
> UBS Limited is a company registered in England & Wales under company 
> number 2035362, whose registered office is at 1 Finsbury Avenue, 
> London, EC2M 2PP, United Kingdom.
>
> UBS AG (London Branch) is registered as a branch of a foreign company 
> under number BR004507, whose registered office is at
> 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
>
> UBS Clearing and Execution Services Limited is a company registered in

> England & Wales under company number 03123037, whose registered office

> is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.
>
>
>
>
>
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>



--
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?
Issued by UBS AG or affiliates to professional investors for 
information only and its accuracy/completeness is not guaranteed. 
All opinions may change without notice and may differ to 
opinions/recommendations expressed by other business areas of UBS. 
UBS may maintain long/short positions and trade in instruments 
referred to. Unless stated otherwise, this is not a personal 
recommendation, offer or solicitation to buy/sell and any 
prices/quotations are indicative only. UBS may provide investment 
banking and other services to, and/or its employees may be directors 
of, companies referred to. To the extent permitted by law, UBS does 
not accept any liability arising from the use of this communication.

 © 2007 UBS.  All rights reserved. Intended for recipient only
and not for further distribution without the consent of UBS.

UBS Limited is a company registered in England & Wales under company
number 2035362, whose registered office is at 1 Finsbury Avenue,
London, EC2M 2PP, United Kingdom.

UBS AG (London Branch) is registered as a branch of a foreign company
under number BR004507, whose registered office is at
1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.

UBS Clearing and Execution Services Limited is a company registered
in England & Wales under company number 03123037, whose registered
office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom.



More information about the R-help mailing list