Learn R Programming

dpcR (version 0.1.2-1)

adpcr2ppp: Convert adpcr to ppp

Description

Quick conversion of adpcr object to the list of ppp.objects.

Usage

adpcr2ppp(input, nx_a, ny_a)

Arguments

input
Object of the adpcr class containing data from one or more panels.
nx_a
Number of columns in a plate.
ny_a
Number of rows in a plate.

Value

  • A list containing objects with class ppp.object with the length equal to the number of plates (minimum 1).

Details

Each plate is independently converted by ppp function. marks attached to each point represent values contained by the adpcr object.

See Also

ppp.object, ppp.

Examples

Run this code
many_panels <- sim_adpcr(m = 400, n = 765, times = 1000, pos_sums = FALSE, 
                   n_panels = 5)

# Convert all plates to ppp objects
adpcr2ppp(many_panels, nx_a = 45, ny_a = 17)

# Convert all plates to ppp objects and get third plate
third_plate <- adpcr2ppp(many_panels, nx_a = 45, ny_a = 17)[[3]]

# Convert only third plate to ppp object
third_plate2 <- adpcr2ppp(extract_dpcr(many_panels, 3), nx_a = 45, ny_a = 
17)

# Check the class of a new object
class(third_plate2)

# It's a list with the length 1. The third plate is a first element on this 
list
class(third_plate2[[1]])

Run the code above in your browser using DataLab