Learn R Programming

fitConic (version 1.2.1)

doWeights: Function to Apply Weights to Data

Description

This function applies an integer weight set to an array of (x,y) data points. It normally is only called from fitConic but can be applied directly to a dataset if desired.

Usage

doWeights(XY, weights)

Value

A new Nx2 array. Basically, each row in the input XY is repeated weights[j] times. ..

Arguments

XY

A Nx2 array of data representing (x,y) pairs

weights

A vector of weights the same length as the number of rows in XY. At this time, only nonnegative integer values are allowed. Doubles are rounded and negative values are set to zero. A zero weight will remove the matching data value from the dataset.

Author

Carl Witthoft <carl@witthoft.com>