Learn R Programming

haplo.stats (version 1.4.4)

setupData: Set up an example dataset provided within the library.

Description

This function defines an alias function to run exactly as data() in R and does nothing in Splus. R keeps a data set within the working data frame, so we only want to load data it when calling an example. Splus keeps it in the background, so it is already loaded upon library(mypkg).

Usage

setupData(...)

Arguments

...
The name of a dataset provided within the Splus/R library.

Value

    Examples

    Run this code
    ## for a data set named my.data load it by
    # setupData(my.data)
    
    ## check the names of my.data to see if it is loaded
    # names(my.data)

    Run the code above in your browser using DataLab