is_balanced: Determine whether a rotor is balanced

Description Usage Arguments Value

Description

Determine whether a rotor is balanced

Usage

1
is_balanced(df, tolerance = 0.001)

Arguments

df

Data.frame with columns

  • x: x-coordinate (numeric)

  • y: y-coordinate (numeric)

  • occupied: boolean

Value

Scalar boolean df <- calculate_positions(30) df$occupied <- FALSE dfc(1, 11, 14, 15, 21, 29, 30), "occupied" <- TRUE is_balanced(df) # TRUE df29, "occupied" <- TRUE is_balanced(df) # FALSE


tomsing1/spinr documentation built on May 3, 2019, 10:44 p.m.