\name{externalVector} \alias{externalVector} \alias{externalLogical} \alias{externalInteger} \alias{externalNumeric} \alias{externalComplex} \alias{externalCharacter} \alias{externalList} \title{ Creating external vectors } \description{ These functions can be used to create new external vector objects with newly allocated storage. } \usage{ externalVector(type = "logical", length = 0, storageClass = "simpleStorage", indirect = FALSE) externalLogical(length = 0, storageClass = "simpleStorage", indirect = FALSE) externalInteger(length = 0, storageClass = "simpleStorage", indirect = FALSE) externalNumeric(length = 0, storageClass = "simpleStorage", indirect = FALSE) externalComplex(length = 0, storageClass = "simpleStorage", indirect = FALSE) externalCharacter(length = 0, storageClass = "simpleStorage", indirect = FALSE) } \arguments{ \item{type}{ A character-string, the name of the class of basic R vectors to be represented by the new external vector object. } \item{length}{ Length of the new external vector } \item{storageClass}{ name of the subclass of "externalStorage" to be used for storing the external vector elements. } \item{indirect}{ If \code{TRUE}, return an "indirectExternalVector" object. } } \details{ These functions are similar to the \code{vector}, \code{logical}, \code{integer}, \code{numeric}, \code{complex} and \code{character} functions in the \R base package. These functions have an extra argument \code{storageClass} to specify the external storage class to use. The default is to use "simpleStorage" which uses garbage collected memory from \R for storage. } \value{ If \code{indirect} is \code{FALSE} (the default) the a new external vector object of the given length, given type with elements stored in an external storage object with class \code{storageClass}. Otherwise create the new external vector object but return it by wrapping it in an "indirectExternalVector" object. } \seealso{ \code{\link{vector}}, \code{\link{logical}}, \code{\link{integer}}, \code{\link{numeric}}, \code{\link{complex}}, \code{\link{character}}, \code{\link{list}} } \examples{ x <- externalVector("numeric", 4) x[] <- 1:4 x[1:3] y <- x+2 y x+y } \keyword{classes}