Hi, i export data from an csv file like this : Data <- read.csv2("c:/Art.csv",sep=",") # import data into R> Data <- Data [1:5,1:5]# extracting the first 5 rows and columns > DataPolicy.Number AXA.Entity Country LoB ccy.data 1 6e+13 BNL BNL P EUR 2 6e+13 USA BNL P EUR 3 6e+13 UK BNL E EUR 4 6e+13 USA BNL P EUR 5 6e+13 I BNL E EUR and i want to have in the first column the number 60000000000000 without using e +13??? someone has an idea please? Thank you very much for your help!!! Inchallah Yarab [[alternative HTML version deleted]]
change the value of 'scipen':> options(scipen=6) > xPolicy.Number AXA.Entity Country LoB ccy.data 1 6e+13 BNL BNL P EUR 2 6e+13 USA BNL P EUR 3 6e+13 UK BNL E EUR 4 6e+13 USA BNL P EUR 5 6e+13 I BNL E EUR> options(scipen=16) > xPolicy.Number AXA.Entity Country LoB ccy.data 1 60000000000000 BNL BNL P EUR 2 60000000000000 USA BNL P EUR 3 60000000000000 UK BNL E EUR 4 60000000000000 USA BNL P EUR 5 60000000000000 I BNL E EUR>On Mon, Aug 17, 2009 at 10:49 AM, Inchallah Yarab<inchallahyarab at yahoo.fr> wrote:> Hi, > > i export data from an csv file like this : > ?Data <- read.csv2("c:/Art.csv",sep=",") # import data into R >> Data <- Data [1:5,1:5]# extracting the first 5 rows and columns >> Data > ? Policy.Number AXA.Entity Country LoB ccy.data > 1???????? 6e+13??????? BNL???? BNL?? P????? EUR > 2???????? 6e+13??????? USA???? BNL?? P????? EUR > 3???????? 6e+13???????? UK???? BNL?? E????? EUR > 4???????? 6e+13??????? USA???? BNL?? P????? EUR > 5???????? 6e+13????????? I???? BNL?? E????? EUR > > > and i want to have in the first column the number 60000000000000 without using e +13??? > > someone has an idea please? > Thank you very much for your help!!! > > Inchallah Yarab > > > > ? ? ? ?[[alternative HTML version deleted]] > > > ______________________________________________ > 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 that you are trying to solve?
On 17/08/2009 10:49 AM, Inchallah Yarab wrote:> Hi, > > i export data from an csv file like this : > Data <- read.csv2("c:/Art.csv",sep=",") # import data into R >> Data <- Data [1:5,1:5]# extracting the first 5 rows and columns >> Data > Policy.Number AXA.Entity Country LoB ccy.data > 1 6e+13 BNL BNL P EUR > 2 6e+13 USA BNL P EUR > 3 6e+13 UK BNL E EUR > 4 6e+13 USA BNL P EUR > 5 6e+13 I BNL E EUR > > > and i want to have in the first column the number 60000000000000 without using e +13???Those are the same numbers, so I think you're asking how to change the default display of data frames. You can use a large positive number in options("scipen") to do this, e.g. options(scipen=10). Duncan Murdoch> > someone has an idea please? > Thank you very much for your help!!! > > Inchallah Yarab > > > > [[alternative HTML version deleted]] > > > > ------------------------------------------------------------------------ > > ______________________________________________ > 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.
On Mon, 17 Aug 2009 16:49:53 +0200, Inchallah Yarab <inchallahyarab at yahoo.fr> wrote:> Hi, > > i export data from an csv file like this : > Data <- read.csv2("c:/Art.csv",sep=",") # import data into R >> Data <- Data [1:5,1:5]# extracting the first 5 rows and columns >> Data > Policy.Number AXA.Entity Country LoB ccy.data > 1 6e+13 BNL BNL P EUR > 2 6e+13 USA BNL P EUR > 3 6e+13 UK BNL E EUR > 4 6e+13 USA BNL P EUR > 5 6e+13 I BNL E EUR > > > and i want to have in the first column the number 60000000000000 without > using e +13??? > > someone has an idea please? > Thank you very much for your help!!! >n <- 60000000000000000000 n #[1] 6e+19 options(scipen=20) n #[1] 60000000000000000000> > > [[alternative HTML version deleted]] >--
On Mon, Aug 17, 2009 at 02:49:53PM +0000, Inchallah Yarab wrote:> Hi, > > i export data from an csv file like this : > ?Data <- read.csv2("c:/Art.csv",sep=",") # import data into R > > Data <- Data [1:5,1:5]# extracting the first 5 rows and columns > > Data > ? Policy.Number AXA.Entity Country LoB ccy.data > 1???????? 6e+13??????? BNL???? BNL?? P????? EUR > 2???????? 6e+13??????? USA???? BNL?? P????? EUR > 3???????? 6e+13???????? UK???? BNL?? E????? EUR > 4???????? 6e+13??????? USA???? BNL?? P????? EUR > 5???????? 6e+13????????? I???? BNL?? E????? EUR > > > and i want to have in the first column the number 60000000000000 without using e +13???I am not sure if this applies to your example, but to me it looks a little like column AXA.Entity is not really a normal number (i.e. meant to ube used in computations) but some kind of ID. In that case, it may be better to enforce a character (or factor) data type for this column when you first read the date (using the colClasses argument to read.table). cu Philipp -- Dr. Philipp Pagel Lehrstuhl f?r Genomorientierte Bioinformatik Technische Universit?t M?nchen Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/