Skip to contents

Create a blank data frame for populating with AOIs

Usage

create_AOI_df(num_AOIs = 3, shape = "rect", AOI_data = NULL)

Arguments

num_AOIs

number of AOIs, setting the number of rows

shape

whether the AOI is rectangular ("rect") or circular ("circ")

AOI_data

a list of data for each AOI, ordered by x, y, width_radius, and height

Value

a dataframe in the standard format required for eyetools

Examples

# create an empty data frame with 3 rectangular shaped AOIs
create_AOI_df(3, shape = "rect")
#>    x  y width_radius height
#> 1 NA NA           NA     NA
#> 2 NA NA           NA     NA
#> 3 NA NA           NA     NA

# create an AOI dataframe with data
create_AOI_df(3, shape = "rect",
              AOI_data = list(c(460,840,400,300), c(1460,840,400,300), c(960,270,300,500)))
#>      x   y width_radius height
#> 1  460 840          400    300
#> 2 1460 840          400    300
#> 3  960 270          300    500
# creating data for circular AOIs
create_AOI_df(3, shape = "circ",
              AOI_data = list(c(460,840,400), c(1460,840,400), c(960,270,300)))
#>      x   y width_radius
#> 1  460 840          400
#> 2 1460 840          400
#> 3  960 270          300