asEach {externalVector} | R Documentation |
This generic coerces each element of an external vector to a particular type.
asEach(x, type, arrayOnly = FALSE)
x |
An external vector object. |
type |
Character-string, a basic vector mode. |
arrayOnly |
If arrayOnly is FALSE (the default) do not
copy extra slots like Names , DimNames or Dim .
|
Another external vector object of same length but with
class(defaultElement(x)) == class(type)
.
as
to convert an object to a different class.
x <- externalCharacter(4) x[] <- c("1", "2", "3", "4") asEach(x, "integer")