Hello I'm using some R code in order to use the model BG-NBD implementation I'm using Java and I call R by using RCaller. I must admit that i'm really really new to R so maybe I'm doing something wrong. I use the code on this URL: http://code.google.com/p/clv-master-thesis/ <http://code.google.com/p/clv-master-thesis/> This is my working Java code (a simple Junit test): @Test public void testRCaller(){ try { RCaller caller = new RCaller(); caller.setRscriptExecutable("/usr/bin/Rscript"); caller.cleanRCode(); RCode code = new RCode(); code.clear(); String helper = "/dati/helper.R"; String modelNbd = "/dati/model-nbd.R"; String modelParetoNbd = "/dati/model-pareto-nbd.R"; String modelBgNbd = "/dati/model-bg-nbd.R"; String modelCbgCnbd = "/dati/model-cbg-cnbd-k.R"; code.R_source(helper); code.R_source(modelNbd); code.R_source(modelParetoNbd); code.R_source(modelBgNbd); code.R_source(modelCbgCnbd); code.addRCode("cdData <- read.table(\"/dati/cdnow.csv\", head=T)"); code.addRCode("names(cdData)[2] <- \"x\";"); code.addRCode("bgMleFit <- bgEstimateParameters(cdData, list(r=1, alpha=2, a=1, b=2));"); code.addRCode("summary(bgMleFit);"); code.addRCode("cdBgParams <- as.list(coef(bgMleFit));"); code.addRCode("t <- 39;"); code.addRCode("cdBgCe <- bgConditionalForecast(cdData, cdBgParams, t);"); code.addRCode("(cdBgSumEstimate <- sum(cdBgCe));"); code.addRCode("(cdBgMsle <- mean((log(cdData$p2x+1)-log(cdBgCe+1))^2));"); code.addRCode("(corr <- cor(cdData$p2x, cdBgCe));"); caller.setRCode(code); caller.runAndReturnResult("cdBgCe"); ROutputParser parser = caller.getParser(); ArrayList<String> nomi = parser.getNames(); for (String nome : nomi) { double[] previsioni = parser.getAsDoubleArray(nome); logger.info("Nome "+nome+" lunghezza valori "+previsioni.length); for (int i = 0; i < previsioni.length; i++) { logger.info("Valore "+ previsioni[i]); } } } catch (Exception e) { logger.error(e.getMessage(), e); } } By running this code all works pretty good; now i didn't want to use the csv file as data source; I wanted to query DB and pass data to R As far as I know the R read.table function builds a data.frame from reading the provided csv file. So what I did is: I used Java in order to read the csv and I wrote this code (after I read the csv file and for semplicity I don't write the code related to the csv reading): @Test public void testRCaller(){ try { RCaller caller = new RCaller(); caller.setRscriptExecutable("/usr/bin/Rscript"); caller.cleanRCode(); RCode code = new RCode(); code.clear(); String helper = "/dati/helper.R"; String modelNbd = "/dati/model-nbd.R"; String modelParetoNbd = "/dati/model-pareto-nbd.R"; String modelBgNbd = "/dati/model-bg-nbd.R"; String modelCbgCnbd = "/dati/model-cbg-cnbd-k.R"; code.R_source(helper); code.R_source(modelNbd); code.R_source(modelParetoNbd); code.R_source(modelBgNbd); code.R_source(modelCbgCnbd); Map<String, Object> data = this.readCsvData(); StringBuilder userIds = new StringBuilder("ID <- c("); long[] utenti = (long[])data.get("userIds"); int[] ordini = (int[]) data.get("ordini"); double[] tx = (double[]) data.get("tx"); double[] t = (double[])data.get("t"); int[] p2x = (int[]) data.get("p2tx"); for(int i = 0; i < utenti.length; i++){ userIds.append(utenti[i]+", "); } //here i check if the stringbuilder ends with, and i clean it...checkSb is simply an utility method userIds = checkSb(userIds).append(");"); code.addIntArray("p1x", ordini); code.addDoubleArray("tx", tx); code.addDoubleArray("t", t); code.addIntArray("p2x", p2x); code.addRCode("cdData<-data.frame(ID , p1x, tx, t, p2x);"); code.addRCode("names(cdData)[2] <- \"x\";"); code.addRCode("bgMleFit <- bgEstimateParameters(cdData, list(r=1, alpha=2, a=1, b=2));"); code.addRCode("summary(bgMleFit);"); code.addRCode("cdBgParams <- as.list(coef(bgMleFit));"); code.addRCode("t <- 39;"); code.addRCode("cdBgCe <- bgConditionalForecast(cdData, cdBgParams, t);"); code.addRCode("(cdBgSumEstimate <- sum(cdBgCe));"); code.addRCode("(cdBgMsle <- mean((log(cdData$p2x+1)-log(cdBgCe+1))^2));"); code.addRCode("(corr <- cor(cdData$p2x, cdBgCe));"); caller.setRCode(code); caller.runAndReturnResult("cdBgCe"); ROutputParser parser = caller.getParser(); ArrayList<String> nomi = parser.getNames(); for (String nome : nomi) { double[] previsioni = parser.getAsDoubleArray(nome); logger.info("Nome "+nome+" lunghezza valori "+previsioni.length); for (int i = 0; i < previsioni.length; i++) { logger.info("Valore "+ previsioni[i]); } } } catch (Exception e) { logger.error(e.getMessage(), e); } } As you can see the code is totally similar to the previous one except that I don't use read.table function. Well by executing this code I have an error. At first I thought in some error in the Java code but I checked and no error was present Then I tried the code in the R console. Well I have something really strange. Let's start from this instruction (the int array is recovered from the csv file): int[] ordini = (int[]) data.get("ordini"); code.addIntArray("p1x", ordini); This Java-RCaller instruction generates this R code: p1x<-c(..........). More exactly the generated R code is the following (be ready: it's huge): p1x<-c(2, 1, 0, 0, 0, 7, 1, 0, 2, 0, 5, 0, 0, 0, 0, 0, 10, 1, 3, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 0, 4, 0, 1, 0, 0, 0, 2, 0, 0, 3, 0, 0, 1, 0, 1, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 7, 0, 10, 0, 0, 1, 6, 0, 0, 0, 0, 0, 2, 4, 1, 5, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 4, 3, 0, 1, 2, 0, 1, 2, 0, 2, 1, 1, 0, 5, 2, 7, 2, 0, 4, 13, 0, 4, 4, 0, 0, 1, 0, 1, 29, 0, 3, 0, 0, 1, 0, 10, 0, 0, 13, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 0, 0, 1, 0, 4, 0, 2, 3, 3, 0, 0, 0, 0, 0, 6, 0, 1, 0, 0, 2, 0, 2, 2, 0, 0, 1, 0, 1, 0, 0, 7, 0, 0, 0, 2, 0, 4, 0, 1, 1, 0, 0, 0, 0, 0, 2, 0, 1, 1, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 1, 0, 0, 2, 6, 0, 1, 0, 0, 0, 0, 2, 0, 7, 0, 1, 2, 1, 1, 1, 0, 0, 1, 5, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 5, 1, 0, 1, 2, 0, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 7, 1, 2, 0, 0, 0, 5, 0, 4, 0); When I execute this function in the R console I have some strain behavior; sometimes it seems to not be executed some other time I have an error like "Unexpected element in......" and I really can't figure where I'm wrong... Instead if I use the "read.table function" all works pretty good. Can you give me any tips? Am I wrong anywhere? Thank you Angelo -- View this message in context: http://r.789695.n4.nabble.com/R-strange-behaviour-when-building-huge-concatenation-tp4650817.html Sent from the R help mailing list archive at Nabble.com.
Any idea on the reason why the instruction p1x<-c(2, 1, 0, 0, 0, 7, 1, 0, 2, 0, 5, 0, 0, 0, 0, 0, 10, 1, 3, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 0, 4, 0, 1, 0, 0, 0, 2, 0, 0, 3, 0, 0, 1, 0, 1, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 7, 0, 10, 0, 0, 1, 6, 0, 0, 0, 0, 0, 2, 4, 1, 5, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 4, 3, 0, 1, 2, 0, 1, 2, 0, 2, 1, 1, 0, 5, 2, 7, 2, 0, 4, 13, 0, 4, 4, 0, 0, 1, 0, 1, 29, 0, 3, 0, 0, 1, 0, 10, 0, 0, 13, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 0, 0, 1, 0, 4, 0, 2, 3, 3, 0, 0, 0, 0, 0, 6, 0, 1, 0, 0, 2, 0, 2, 2, 0, 0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, 1, 0, 0, 0, 0, 0, 1, 4, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 6, 0, 0, 0, 0, 1, 0, 0, 2, 6, 0, 1, 0, 0, 0, 0, 2, 0, 7, 0, 1, 2, 1, 1, 1, 0, 0, 1, 5, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 5, 1, 0, 1, 2, 0, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 7, 1, 2, 0, 0, 0, 5, 0, 4, 0); give to me problems? Thank you Angelo -- View this message in context: http://r.789695.n4.nabble.com/R-strange-behaviour-when-building-huge-concatenation-tp4650817p4650895.html Sent from the R help mailing list archive at Nabble.com.
No idea. It seems fine to me. Perhaps a bit more information would be useful expecially your sessionInfo() See http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example for some suggestions on forming questions. John Kane Kingston ON Canada> -----Original Message----- > From: angeloimm at gmail.com > Sent: Mon, 26 Nov 2012 13:24:28 -0800 (PST) > To: r-help at r-project.org > Subject: Re: [R] R strange behaviour when building huge concatenation > > Any idea on the reason why the instruction > p1x<-c(2, 1, 0, 0, 0, 7, 1, 0, 2, 0, 5, 0, 0, 0, 0, 0, 10, 1, 3, 0, 2, 0, > 0, > 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 12, 0, > 0, > 1, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 0, 4, 0, 1, 0, 0, 0, 2, 0, 0, 3, 0, 0, > 1, > 0, 1, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0, 7, 0, 10, 0, 0, 1, 6, 0, 0, 0, 0, 0, > 2, > 4, 1, 5, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, > 0, > 0, 1, 0, 0, 0, 4, 3, 0,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, 0, 3, 0, 0, 0, 2, 5, 0, 1, 0, 0, 1, 0, 1, 0, 0, 2, 0, 1, 2, > 0, > 0, 7, 0, 0, 2, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 8, 0, 0, 5, 0, 1, 0, 1, 0, > 1, > 0, 0, 1, 0, 3, 0, 2, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 2, > 0, > 0, 1, 0, 1, 2, 0, 0, 1, 0, 2, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9, 3, > 0, > 0, 0, 0, 0, 0, 3, 0, 0, 2, 0, 1, 1, 1, 0, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, > 0, > 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 4, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, > 0, > 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 6, 0, 0, 0, 0, 1, 0, 0, 2, 6, 0, 1, > 0, > 0, 0, 0, 2, 0, 7, 0, 1, 2, 1, 1, 1, 0, 0, 1, 5, 0, 1, 0, 0, 2, 0, 0, 0, > 0, > 0, 0, 1, 0, 0, 1, 0, 1, 0, 5, 1, 0, 1, 2, 0, 0, 1, 2, 0, 1, 0, 2, 0, 1, > 2, > 7, 1, 2, 0, 0, 0, 5, 0, 4, 0); > > give to me problems? > Thank you > Angelo > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/R-strange-behaviour-when-building-huge-concatenation-tp4650817p4650895.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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.____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
> -----Original Message----- > From: angeloimm at gmail.com > Sent: Wed, 28 Nov 2012 00:12:27 -0800 (PST) > To: r-help at r-project.org > Subject: Re: [R] R strange behaviour when building huge concatenation > > Hello John > Thank you for the tips > I already tried by using RKWard and RStudio and I got the same error...so > I > passed to the R console > Maybe it's the buffer limit but, since I'm really newbie to R, I'ld like > to > know how to configure this limit > In any case in my application I'ld like to avoid to write data in a csv > file (by using java) and then use R in order to import these data....I'ld > like to read data from DB and then pass them to R (well it'ld be good > also > if R read data from DB...but I'm afraid I can do a great mistake in > handling connection and so on in R and my time is really short) > Is there any way in order to read data from db (in Java) and pass all the > data to R without write them in a csv file?I'm sorry but that's far beyond my expertise. I am sure there is and it does not "look" all that hard to read from a db but I tend to use small data sets or existing ones that don't usually have input problems like that . I am using a bog-standard labtop with 4GB RAM with Ubuntu 12.10 and R2.15.2 so if there is a limit I would have thought I'd experience it. So I'm out of ideas though for RStudio it might be worth asking it on their website and see if they have any suggestions about limits or if it is a peculiarity of your setup. Here's my sessionInfo for comparison.> > Thank you to all you > Cheers, > Angelo > > > 2012/11/27 John Kane [via R] <ml-node+s789695n4651040h45 at n4.nabble.com> > >> I am currently getting the very strange results that if I paste your >> orginal data from your first message into my R terminal I get the same >> errors you do. By the way that ";" is not needed in R. >> >> If I paste the same data into Rstudo, either into the editor or the >> console it works fine. >> >> If I paste the data into gedit and send it to the console it works fine >> but if I paste it into the gedita console I get your error messages >> again. >> A quick try, pasting it into an R buffer in EMACS seems to work just >> fine. >> >> I have no idea what is happening unless jagat.k.sheth is correct and we >> are hitting a buffer limit of some kind. >> >> I'd suggest getting a decent editor and going with it. Working directly >> in an R terminal is enough to drive most people crazy. >> >> Any of the editiors/ides mentioned above are good with different >> strengtsts etc. At a guess, Rstudio is the easiest to install and get >> running on Ubuntu, gedit is pretty easy but you need to install the r >> gedit >> plug-in. EMACS as far as I can tell is very good and very powerful but I >> have not used it enough to really comment on it. >> >> In any case one way or the other they can read in the data. I'd also >> suggest not even 'thinking' about writing a vector statement that long. >> It >> would be much easier to do something like write the numbers in a column >> in >> a spreadsheet and import from there. There are various ways to do this >> but >> the simplist would be to just save the file as a csv file and import it >> using read.table or read.csv. >> >> I'm sorry that I cannot be of more help. Perhaps one of the R gurus can >> comment on the possible buffer problem. >> >> John Kane >> Kingston ON Canada >> >> >>> -----Original Message----- >>> From: [hidden >>> email]<http://user/SendEmail.jtp?type=node&node=4651040&i=0> >>> Sent: Tue, 27 Nov 2012 07:04:13 -0800 (PST) >>> To: [hidden >>> email]<http://user/SendEmail.jtp?type=node&node=4651040&i=1> >>> Subject: Re: [R] R strange behaviour when building huge concatenation >>> >>> Hello John >>> It seems correct to me too but in my R console it seems to not be >> working >>> Here there is what I did: >>> i copied the statement on one row (leaving and removing the final >> useless >>> semi colomn) >>> i tried to execute it in the R console (in order to open my R console I >>> simply opened a terminal window on my ubuntu machine and I typed "R") >>> when I click "enter" the inserted statement doesn't not run...I simply >>> see >>> the cursor on a new line and this new line starts with "+" >>> >>> Here there is a little stack of what I see on my terminal: >>> , 1, 1, 2, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 17, 2, 2, >>> 0, >>> 2, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, >>> 0, >>> 1, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 7, 0, 0, 1, 0, 0, 3, 0, 0, 2, >>> 4, >>> 0, 1, 0, 0, 0, 0, 2, 1, 0, 4, 2, 0, 0, 1, 3, 0, 0, 1, 0, 0, 1, 0, 1, 1, >>> 0, >>> 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 1, 0, 1, 1, 3, 3, 0, 0, 0, 0, 1, 0, 2, >>> 0, >>> 1, 0, 0, 0, 1, 1, 0, 2, 0, 2, 0, 3, 0, 4, 0, 1, 1, 0, 0, 1, 0, 3, 0, 0, >>> 0, >>> 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 3, 0, 6, 0, 0, 0, 0, 3, 0, 0, 0, 2, 5, >>> 0, >>> 1, 0, 0, 1, 0, 1, 0, 0, 2, 0, 1, 2, 0, 0, 7, 0, 0, 2, 0, 2, 2, 0, 0, 0, >>> 0, >>> 0, 2, 0, 8, 0, 0, 5, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 3, 0, 2, 0, 0, 0, 2, >>> 1, >>> 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 2, 0, 0, 1, 0, 1, 2, 0, 0, 1, 0, 2, 0, >>> 0, >>> 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 9, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2, 0, 1, >>> 1, >>> 1, 0, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, >>> 0, >>> 1, 4, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, >>> 0, >>> 6, 0, 0, 0, 0, 1, 0, 0, 2, 6, 0, 1, 0, 0, 0, 0, 2, 0, 7, 0, 1, 2, 1, 1, >>> 1, >>> 0, 0, 1, 5, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 5, 1, >>> 0, >>> 1, 2, 0, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 7, 1, 2, 0, 0, 0, 5, 0, 4, 0)) >>> + >>> + >>> + >>> + >>> + >>> >>> Each time i click enter i go on a new line starting with "+" >>> Then if i start in tying some character I get an error like this: >>> >>> + >>> + >>> + q >>> + >>> + q >>> Errore: unexpected symbol in: >>> " >>> q" >>> >>> Sometimes this error (Errore: unexpected symbol in:) appears in the >>> statement execution >>> >>> Here there are my sessionInfo() result: >>>> sessionInfo() >>> R version 2.14.1 (2011-12-22) >>> Platform: i686-pc-linux-gnu (32-bit) >>> >>> locale: >>> [1] LC_CTYPE=it_IT.UTF-8 LC_NUMERIC=C >>> [3] LC_TIME=it_IT.UTF-8 LC_COLLATE=it_IT.UTF-8 >>> [5] LC_MONETARY=it_IT.UTF-8 LC_MESSAGES=it_IT.UTF-8 >>> [7] LC_PAPER=C LC_NAME=C >>> [9] LC_ADDRESS=C LC_TELEPHONE=C >>> [11] LC_MEASUREMENT=it_IT.UTF-8 LC_IDENTIFICATION=C >>> >>> attached base packages: >>> [1] stats graphics grDevices utils datasets methods base >>> >>> >>> I really don't know why this happens....above all because it seems to >>> me >>> a >>> very very simple statement... >>> Thank to all you for the support >>> >>> >>> >>> >>> -- >>> View this message in context: >>> >> http://r.789695.n4.nabble.com/R-strange-behaviour-when-building-huge-concatenation-tp4650817p4650970.html >>> Sent from the R help mailing list archive at Nabble.com. >>> >>> ______________________________________________ >>> [hidden email] >>> <http://user/SendEmail.jtp?type=node&node=4651040&i=2>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. >> >> ____________________________________________________________ >> FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! >> >> ______________________________________________ >> [hidden email] >> <http://user/SendEmail.jtp?type=node&node=4651040&i=3>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. >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the >> discussion >> below: >> >> http://r.789695.n4.nabble.com/R-strange-behaviour-when-building-huge-concatenation-tp4650817p4651040.html >> To unsubscribe from R strange behaviour when building huge >> concatenation, click >> here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4650817&code=YW5nZWxvaW1tQGdtYWlsLmNvbXw0NjUwODE3fC04MTM3OTMwMDg=> >> . >> NAML<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> > > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/R-strange-behaviour-when-building-huge-concatenation-tp4650817p4651094.html > Sent from the R help mailing list archive at Nabble.com. > [[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.____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!