doWeights: Function to Apply Weights to Data

View source: R/doWeights.R

doWeightsR Documentation

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)

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.

Value

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

Author(s)

Carl Witthoft <carl@witthoft.com>


fitConic documentation built on Aug. 29, 2023, 1:12 a.m.