hello, I don't understand what's happen just before the textConnection function runs good but now it doesn't run> Line[1][1] "if C325=. then C743=(C152/C103)*100| else C743=(C152/C325)*100"> textConnection(Line[1])Erreur dans textConnection(Line[1]) : toutes les connexions sont utilisées why R display that? _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail [[alternative HTML version deleted]]
It means what it says. You do need to close() connections, as there is a finite number available. (The number depends on your unstated version of R, but is at least 50.) On Tue, 15 May 2007, elyakhlifi mustapha wrote:> hello, > I don't understand what's happen just before the textConnection function runs good but now it doesn't run > >> Line[1] > [1] "if C325=. then C743=(C152/C103)*100| else C743=(C152/C325)*100" >> textConnection(Line[1]) > Erreur dans textConnection(Line[1]) : toutes les connexions sont utilis?es > > why R display that? > > > _____________________________________________________________________________ > Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail > [[alternative HTML version deleted]] > >-- 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
1. closeAllConnections() will close all open connections so con <- textConnection(Line) closeAllConnection() # now there are no open connections left 2. close() will close an individual connection: con <- textConnection(Line) scan(con, what = "") close(con) 3. strsplit will split your line without using connections strsplit(gsub(" +", " ", Line), " ") 3a. This is the shorter for the case that there is exactly one space between words: strsplit(Line, " ") On 5/15/07, elyakhlifi mustapha <elyakhlifi_mustapha at yahoo.fr> wrote:> hello, > I don't understand what's happen just before the textConnection function runs good but now it doesn't run > > > Line[1] > [1] "if C325=. then C743=(C152/C103)*100| else C743=(C152/C325)*100" > > textConnection(Line[1]) > Erreur dans textConnection(Line[1]) : toutes les connexions sont utilis?es > > why R display that? > > > _____________________________________________________________________________ > Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help at stat.math.ethz.ch 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. > >