Learn R Programming

GPUmatrix (version 1.0.2)

concatenate_gpu.matrix: concatenate_gpu.matrix

Description

Mimics the 'base' function 'c' to operate on gpu.matrix objects: function which "combines its arguments to form a vector. All arguments are coerced to a common type which is the type of the returned value." In most of the cases, the returned object is of type 'numeric'.

Usage

# S4 method for gpu.matrix.tensorflow
c(x,...,recursive)
# S4 method for gpu.matrix.torch
c(x,...,recursive)
# S4 method for numMatrixLike
c(x,...,recursive)

Value

It will return a vector of type 'numeric' with the combined values.

Arguments

x

A gpu.matrix object

...

objects to be concatenated.

recursive

The same as c: Logical. If recursive = TRUE, the function recursively descends through lists (and pairlists) combining all their elements into a vector.

See Also

See also: c.

Examples

Run this code

# \donttest{
if (FALSE) {

#add new value
a <- gpu.matrix(1:5,nrow=1,ncol=5)
c(a,3)

#add other vector
c(a,a)

#add value to a gpu.matrix
a <- gpu.matrix(1:9,nrow=3,ncol=3)
c(a,a)
#it will return a vector as in original c function.


}
# }

Run the code above in your browser using DataLab