Learn R Programming

sclero (version 0.2)

order.ijdata: Order IJDATA spot sequences and growth lines

Description

Reorders spot sequences and growth lines within object of class IJDATA.

Usage

order.ijdata(IJDATA, spots = "", gbs = "", print.order = FALSE)

Arguments

IJDATA
an IJDATA object.
spots
a character or numeric vector specifying the desired order of sample spot sequences.
gbs
a character or numeric vector specifying the desired order of growth lines.
print.order
logical. Should the current order of spot sequences and growth lines be printed instead of changing the order?

Details

Reorders IJDATA spot.x and spot.y and/or gbs.x and gbs.y coordinate data.frames. Useful when order of ROIs does not correspond with the desired order of convert.ijdata or spot.dist output. Can also be used to print the order of spot sequences and growth lines within IJDATA object (see 'print.order'). In addition the function can also be used to drop spot sequences or growth lines from the data set by leaving out ROI names. In this case a warning is produced to confirm that the user has not forgotten something.

See Also

read.ijdata for reading zip files containing ImageJ ROIs.

convert.ijdata for converting the coordinate information to spatstat point patterns.

Examples

Run this code
data(shellspots)
order.ijdata(shellspots, print.order = TRUE) # Prints the current order. Does not change anything
dat <- order.ijdata(shellspots, gbs = c(1,3,6:14,4,5,2)) # Changes order of growth bands
order.ijdata(dat, print.order = TRUE)

## Subset the first sample spot sequence
dat2 <- order.ijdata(shellspots, gbs = 1:13)
## Warning message:
## In order.ijdata(shellspots, gbs = 1:13) :
## Length of gbs does not correspond the number of columns. Data removed.
order.ijdata(dat2, print.order = TRUE)

Run the code above in your browser using DataLab