Hi, A small (but annoying) problem with RMySQL library. When a connection is closed, it echoes 'TRUE' to the console. Like this: R> mysqlCloseConnection(con) [1] TRUE The real problem comes when I use RMySQL with Sweave, since the TRUE echo gets into my final Sweave document. Even when I explicitly state <<include=FALSE, echo=FALSE>>= in the header of the R code chunk. Is there a way to suppress this TRUE echo? TIA / s
Try this: invisible(mysqlCloseConnection(con)) On Fri, Jan 29, 2010 at 9:10 AM, Stefan Petersson <stefan.petersson at inizio.se> wrote:> > Hi, > > A small (but annoying) problem with RMySQL library. When a connection is closed, it echoes 'TRUE' to the console. Like this: > > ?R> mysqlCloseConnection(con) > ?[1] TRUE > > The real problem comes when I use RMySQL with Sweave, since the TRUE echo gets into my final Sweave document. Even when I explicitly state <<include=FALSE, echo=FALSE>>= in the header of the R code chunk. > > Is there a way to suppress this TRUE echo? > > TIA > > ?/ s > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O
Stefan Petersson wrote:> Hi, > > A small (but annoying) problem with RMySQL library. When a connection is closed, it echoes 'TRUE' to the console. Like this: > > R> mysqlCloseConnection(con) > [1] TRUE > > The real problem comes when I use RMySQL with Sweave, since the TRUE echo gets into my final Sweave document. Even when I explicitly state <<include=FALSE, echo=FALSE>>= in the header of the R code chunk. >include=FALSE stops graphs from being included. echo=FALSE stops the R input from being echoed. You want results=hide to stop the results from being shown. So to make that call completely invisible, use <<echo=FALSE, results=hide>>mysqlCloseConnection(con) @ Duncan Murdoch> Is there a way to suppress this TRUE echo? > > TIA > > / s > > ______________________________________________ > 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. >