increase_n_data_points: Increase the Number of Data Points in a Coordinate Data Frame

View source: R/i.R

increase_n_data_pointsR Documentation

Increase the Number of Data Points in a Coordinate Data Frame

Description

This function artificially increases the number of data points in a given coordinate data frame. It generates additional points by adding random noise to the existing coordinates, ensuring the new points stay within the original range of the data.

Usage

increase_n_data_points(coords_df, fct = 10, cvars = c("x", "y"))

Arguments

coords_df

A data frame containing the original coordinates. Must include columns specified in cvars.

fct

A numeric factor indicating how many times the number of data points should be increased. The function will round this number up to the nearest integer.

cvars

A character vector specifying the column names of the coordinates in coords_df.

Value

A data frame with the increased number of data points.


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.