[Rodbcext-commits] r7 - in pkg/rodbcExt: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Feb 25 06:43:30 CET 2009
Author: jaunario
Date: 2009-02-25 06:43:30 +0100 (Wed, 25 Feb 2009)
New Revision: 7
Added:
pkg/rodbcExt/R/closeExt.R
pkg/rodbcExt/man/closeExt.Rd
Log:
Closes a connection and removes the connection object from memory.
Added: pkg/rodbcExt/R/closeExt.R
===================================================================
--- pkg/rodbcExt/R/closeExt.R (rev 0)
+++ pkg/rodbcExt/R/closeExt.R 2009-02-25 05:43:30 UTC (rev 7)
@@ -0,0 +1,19 @@
+# Author: Jorrel Khalil S. Aunario, jaunario at gmail.com
+# Date: 24 February 2009
+# Version 0.1.1
+# License GPL3
+
+cleanDisconnect <- function(channel, rmv=T){
+ odbcClose(channel)
+ if (rmv){
+ objs <- ls(envir=.GlobalEnv)
+ for (obj in objs){
+ cobj <- get(obj, envir=.GlobalEnv)
+ if(is.atomic(cobj)|is.list(cobj) ){
+ if (cobj==channel){
+ rm(list=obj, envir=.GlobalEnv)
+ }
+ }
+ }
+ }
+}
Added: pkg/rodbcExt/man/closeExt.Rd
===================================================================
--- pkg/rodbcExt/man/closeExt.Rd (rev 0)
+++ pkg/rodbcExt/man/closeExt.Rd 2009-02-25 05:43:30 UTC (rev 7)
@@ -0,0 +1,37 @@
+\name{closeExt}
+\alias{cleanDisconnect}
+%- Also NEED an '\alias' for EACH other topic documented here.
+\title{ Closing Connections in rodbcExt }
+\description{
+ Closes a databases connection and then removes the object from memory.
+}
+\usage{
+cleanDisconnect(channel, rmv=T)
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+ \item{channel}{ ~~Describe \code{yields} here~~ }
+ \item{rmv}{ ~~Describe \code{fact} here~~ }
+}
+\details{
+ ~~ If necessary, more details than the description above ~~
+}
+\value{
+ ~Describe the value returned
+ If it is a LIST, use
+ \item{comp1 }{Description of 'comp1'}
+ \item{comp2 }{Description of 'comp2'}
+ ...
+}
+\references{ ~put references to the literature/web site here ~ }
+\author{ Jorrel Khalil S. Aunario }
+\note{ ~~further notes~~
+
+ ~Make other sections like Warning with \section{Warning }{....} ~
+}
+\seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ }
+\examples{
+ }
+
+
+\keyword{ spatial }
More information about the Rodbcext-commits
mailing list