dftest {rgr}R Documentation

Check for the Existence of a Data Frame

Description

A utility function to determine if a data frame is attached, or exists in the working directory. If the data frame exists the names of the variables are displayed.

Usage

dftest(dfname, x = NULL)

Arguments

dfname name of a data frame.
x setting x to an expected variable name in the data frame results in the variable's length, i.e., number of observations, being displayed if it is present.

Details

Based on a function shared on S-News.

Author(s)

Unkown

See Also

search, ls

Examples

## Make test data available
data(kola.o)

## Check that the data frame kola.o is available
dftest(kola.o)

## Check that kola.o is available and that the variable Cu is present
dftest(kola.o, x = Cu)


[Package rgr version 1.0.3 Index]