assign.value: Assign values to 'rawDist' objects for plotting.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/assign.value.R

Description

Assigns values to rawDist objects for spatial density plotting.

Usage

1
assign.value(rawDist, value, value.name = NULL)

Arguments

rawDist

rawDist object to which the values should be assigned.

value

a data.frame or list of data.frames of the same length than spot spequences (spots). Each data.frame has to have identical length to spots. First column specifies the order. Second column containing the values (see Details).

value.name

a character or function defining the name for the assigned value. Can be expression

Details

This function can be used to plot values as color-densities on sample maps. The function is useful e.g. for examining the spatial distribution of geochemical data, such as element ratios or isotope ratios, along sample materials. If the rawDist object contains only one sample spot sequence, the value parameter should be expressed as a data.frame with two columns. If the rawDist object consists of several sample spot sequences, the value parameter should be a list of data.frames with length equivalent to number of spot sequences. The first column in all value data.frames represents spot number and should be equivalent to $spots marks in the rawDist object. The second column represents the values to be assigned. Column names are ignored.

Value

Returns a list of class rawDist containing spot value information.

Author(s)

Mikko Vihtakari

See Also

read.ijdata spot.dist assign.size plot.rawDist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(barium)
data(shellsizes)

## rawDist
shellvalues <- assign.value(shellsizes, barium, value.name = "Ba/Ca")
plot(shellvalues, spot.size = "actual", spot.type = "value", main.type = "none")

## spotDist
shellvalues.aligned <- spot.dist(shellvalues)
plot(shellvalues.aligned, spot.size = "actual", spot.type = "idvalue", 
spot.color = "darkgrey", highlight.gbs = c("WG_start", "WG_end"))

sclero documentation built on May 2, 2019, 2:26 p.m.