Learn R Programming

LotkasLaw (version 0.0.1.0)

LotkasN: Runs the creation of N in Lotkas Law

Description

Runs The Creation of Lotkas Value N.

Usage

LotkasN(Sums, FullTable)

Arguments

Sums
Sumed table from the Data being Tested
FullTable
Full table is the full table of data that is being imported for testing.

Value

The returned value is N in Lotkas Law.

Examples

Run this code
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
LotkasN <- function(Sums,FullTable)
{
  N <- nrow(FullTable)
  lx <- Sums[3]
  ly <- Sums[4]
  xy <- Sums[5]
  x2 <- Sums[6]
  lx2 <- lx^2
  top <- (N*xy) - (lx*ly)
  bottom <- (N*x2) - (lx2)
  Nfinal <- top/bottom
  return(Nfinal)
}

Run the code above in your browser using DataLab