Learn R Programming

sclero (version 0.2)

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

Description

Assigns values to rawDist objects for spatial density plotting.

Usage

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

Value

Returns a list of class rawDist containing spot value information.

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.

See Also

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

Examples

Run this code
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"))

Run the code above in your browser using DataLab