Learn R Programming

sportyR (version 2.2.2)

reflect: Perform a mathematical reflection of coordinates over a specified axis

Description

Perform a mathematical reflection of coordinates over a specified axis

Usage

reflect(df, over_x = FALSE, over_y = TRUE)

Value

The reflected data frame

Arguments

df

The data frame to reflect. It must have x and y columns

over_x

A boolean indicating whether or not to reflect over the x axis. Default: FALSE

over_y

A boolean indicating whether or not to reflect over the y axis. Default: TRUE

Examples

Run this code
reflect(data.frame(x = 1, y = 0))

Run the code above in your browser using DataLab