Description Usage Arguments Value Author(s) See Also Examples
Remove or rename a variables in a data frame.
1 2 | rename.vars(data, from="", to="", info=TRUE)
remove.vars(data, names="", info=TRUE)
|
data |
dataframe to be modified. |
from |
character vector containing the current name of each variable to be renamed. |
to |
character vector containing the new name of each variable to be renamed. |
names |
character vector containing the names of variables to be removed. |
info |
boolean value indicating whether to print details of the removal/renaming. Defaults to TRUE. |
The updated data frame with variables listed in from
renamed to
the corresponding element of to
.
Code by Don MacQueen macq\@llnl.gov. Documentation by Gregory R. Warnes greg@warnes.net
1 2 3 4 5 6 7 |
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to locate valid perl interpreter
gdata:
gdata: read.xls() will be unable to read Excel XLS and XLSX files
gdata: unless the 'perl=' argument is used to specify the location of a
gdata: valid perl intrpreter.
gdata:
gdata: (To avoid display of this message in the future, please ensure
gdata: perl is installed and available on the executable search path.)
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLX' (Excel 97-2004) files.
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLSX' (Excel 2007+) files.
gdata: Run the function 'installXLSXsupport()'
gdata: to automatically download and install the perl
gdata: libaries needed to support Excel XLS and XLSX formats.
Attaching package: 'gdata'
The following object is masked from 'package:stats':
nobs
The following object is masked from 'package:utils':
object.size
The following object is masked from 'package:base':
startsWith
[1] "x" "y" "z"
Changing in data
From: x y z
To: first second third
[1] "first" "second" "third"
Removing variable 'second'
[1] "first" "third"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.