RemoveAt | R Documentation |
RemoveAt
Removes one or more elements from an object. Dimensions are never If all elements are removed from a vector, then a 0-length vector is returned.
RemoveAt(x, at = NULL, MARGIN = NULL, ignore.case = TRUE, split = NULL)
## S3 method for class 'data.frame'
RemoveAt(x, at = NULL, MARGIN = NULL, ignore.case = TRUE, split = NULL)
## S3 method for class 'array'
RemoveAt(x, at = NULL, MARGIN = NULL, ignore.case = TRUE, split = NULL)
## S3 method for class 'matrix'
RemoveAt(x, at = NULL, MARGIN = NULL, ignore.case = TRUE, split = NULL)
## S3 method for class 'ftable'
RemoveAt(x, at = NULL, MARGIN = NULL, ignore.case = TRUE, split = NULL)
x |
The object from which the elements are to be removed. |
at |
A |
MARGIN |
An |
ignore.case |
Ignores case if and when removing elements based on their names. |
split |
Character delimiter to split |
An object of the same class as x
.
RemoveAt(data.frame)
: Where only a at
is provided, it is assumed
to be the variables of a data frame. Otherwise, the first MARGIN
is assumed the rows and the second the columns.
RemoveAt(array)
: If MARGIN
is not provided, the at
argument
is used along all margins. If at
is a list, then each
list element is sequentially used along each MARGIN
If at
is not a list, then it all elements inside is
are removed across all margins.
RemoveAt(matrix)
: Applies the array method
RemoveAt(ftable)
: If any characters are used in at
but the ftable
doesn't have dimnames then the original ftable
is returned.
If integer references are used, then the appropriate dim is
removed using the array method.
If the ftable
has dimnames and characters are used at
then array method is used so that the dimnames of ftable
are used to determine the rows or columns in the removal.
In all cases, the row.var
and col.var
attributes
are not retained in the output.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.