Learn R Programming

habtools (version 1.1.1)

cell_count_1d: Count filled cells in 1D

Description

A helper function for segment, box and cube counting fractal methods. The function divide the array into n pieces and counts how many are occupied.

Usage

cell_count_1d(pts, xmin, xmax, n)

Value

Number of filled cells

Arguments

pts

Data frame with x coordinates

xmin

Minimum x-value

xmax

Maximum x-value

n

Multiplier

Examples

Run this code
pts <- data.frame(x = rnorm(200, 0, 5))
cell_count_1d(pts, xmin = min(pts$x), xmax = max(pts$x), n = 5)


Run the code above in your browser using DataLab