convert.ijdata
function.
read.ijdata(X, spots = "point", gbs = "polyline", main = "line", names = "generate.invalid", spot.names = NULL, gbs.names = NULL, main.name = "main", sample.name = "file", scale = 1, unit = NULL)
ijzip
object."point"
(See "Details" for further information)."polyline"
. f left empty the remaining elements that are not defined in holes and main are assumed to be growth lines. For further information see spots
and "Details". At the moment spots
must be specified for this option to work."line"
. At the moment spots
must be specified for this option to work.spots
and gbs
should be generated. These names will be used in further functions (convert.ijdata
, spot.dist
). In general, it is adviced to use simple ROI names without special characters (for example -
is not allowed in a ROI name; see 'Details'). Possible names
options are:
"generate.invalid"
(default). Uses the ROI object names, except when they are not valid data.frame
column names. In the latter case sequential names will be generated.
"generate"
. Generates sequential names for all elements.
"keep"
. Uses the ROI object names, except when they are not valid data.frame
column names. In the latter case make.names
function will be used to generate data.frame
combatible column names.
"force.keep"
. Uses the ROI object names as they are in the .zip file. Using this option might cause problems in consequent functions and is not recommended.
"manual"
. Names for both spots
and gbs
are searched from spot.names
and gbs.names
arguments, respectively.
"manual.spots"
. Names for spots
are searched from spot.names
argument. Names for gbs
are generated following "generate.invalid"
.
"manual.gbs"
. Names for gbs
are searched from gbs.names
argument. Names for spots
are generated following "generate.invalid"
.
spots
defining the names of sample spot sequences. Required if names = "manual"
or "manual.spots"
. Ignored otherwise.gbs
defining the names of growth bands. Required if names = "manual"
or "manual.gbs"
. Ignored otherwise.main
). If main.name = "keep"
, the ROI object name will be used (not recommended, see "Details"). Otherwise the name will be taken from the argument. Defaults to "main"
.ijzip
object name is used as a default (sample.name = "file"
).unit
. Defaults to 1.scale
.spots.x
and spots.y
), growth bands (gbs.x
and gbs.y
), and measurement axis (main.x
and main.y
) together with sample name, scaling factor and unit of measurement.
spots
) by default. Further, all "polyline" objects are assumed as growth bands (gbs
) and "line" objects as the measurement axis (main
) resulting to that only one "line" object is allowed per .zip file using the default settings. Alternatively, the user can specify the spots
, gbs
, and main
objects manually using the order of the ImageJ .zip file with the exception that only one measurement axis is allowed per rawDist
or spotDist
object. Punctuation characters other than _
or .
should not be used as names of spots
or gbs
, because they tend to confuse the internal grep
functions in spot.dist
function. Hence it is adviced to use one of the options renaming invalid names of spots
and gbs
("generate.invalid"
, "generate"
, "keep"
).
order.ijdata
for ordering and subsetting read.ijdata
output.convert.ijdata
for converting the coordinate information to spatstat point patterns.
spot.dist
for aligning sample spot sequences.
read.ijroi
and read.ijzip
for reading ImageJ ROI and .zip files.
# Locate the example zip file
path <- file.path(system.file("extdata", package = "sclero"), "shellspots.zip")
# You can replace 'path' by 'Your_file_name.zip'
dat <- read.ijdata(path)
summary(dat)
## Works also for IJZIP objects
dat2 <- read.ijzip(path)
dat2 <- read.ijdata(dat2)
dat[!(dat %in% dat2)] # Only the sample name differs
Run the code above in your browser using DataLab