Learn R Programming

genvar (version 0.0.2.0)

namedata: names a data set so that it can be restored by that name later on

Description

names a data set so that it can be restored by that name later on

Usage

namedata(name, original = NULL, clear = FALSE)

Arguments

name

a string giving the desired name for the dataset

original

a string giving the current name of the dataset or NULL to set the name for the currently-loaded dataset (default: NULL)

clear

if TRUE, overwrite current dataset at that name, if FALSE, stop if the dataset already exists (default: FALSE).

Value

returns NULL invisibly

Examples

Run this code
# NOT RUN {
use(cars, clear=TRUE)
namedata("cars", clear=TRUE)
library(plm)
data(Produc)
use(Produc, clear=TRUE)
namedata("product", clear=TRUE)
listdata()
namedata("cars_new_name", original="cars", clear=TRUE)
listdata()
# }

Run the code above in your browser using DataLab