tmpfun {dga}R Documentation

Another Helper Function.

Description

This makes a vector of zeroes and puts a 1 in the x'th place.

Usage

tmpfun(x, p)

Arguments

x

where the one should be.

p

the length of the vector.

Value

a vector of length p with a one in the xth location.

Author(s)

Kristian Lum kl@hrdag.org

Examples


## The function is currently defined as
function (x, p) 
{
    tmp <- rep(0, p)
    tmp[x] <- 1
    return((tmp))
  }

[Package dga version 1.2 Index]