This function gives access to the underlying values defining the geometries
in a vector. As such they return the same information as calling
`as.matrix()`

on a geometry vector except the return value is kept as an
exact numeric and that you can extract from single elements if the
cardinality of the geometry exceeds 1.

parameter(x, ...) # S3 method for euclid_geometry parameter(x, which, element = NA, ...) # S3 method for euclid_affine_transformation parameter(x, i, j, ...)

x | A geometry vector |
---|---|

... | parameters to pass on |

which | Either a name or the index of the definition to extract, as
matched to |

element | For geometries with a cardinality above 1, which element of
the geometry should the definition be extracted for. If |

i, j | The row and column of the cell in the transformation to fetch. |

An exact_numeric vector

#> <exact numerics [1]> #> [1] 25# Get all the x values from the source of segments s <- segment(point(sample(10, 4), sample(10, 4)), point(sample(10, 4), sample(10, 4))) parameter(s, "x", 1L)#> <exact numerics [4]> #> [1] 9 1 6 2# Get y for all subelements parameter(s, "y")#> <exact numerics [8]> #> [1] 2 1 8 2 10 3 9 9# Extract cell values from transformation matrices m <- affine_rotate(c(pi/2, pi/3)) parameter(m, 1, 2)#> <exact numerics [2]> #> [1] -1.0000000 -0.8660254