Learn R Programming

pavo (version 1.0.0)

merge.rspec: Merge two rspec objects

Description

Merges two rspec or data.frame objects into a single rspec object.

Usage

"merge"(x, y, by = "wl", ...)

Arguments

x, y
(required) two data frames (or rspec objects) to merge.
by
wavelength column name (defaults to "wl").
...
additional class arguments.

Value

an object of class rspec for use with pavo functions.

See Also

as.rspec, aggspec

Examples

Run this code
## Not run: 
# 
# # Load and split dataset into 2 sections
# data(teal)
# teal1 <- teal[, c(1, 3:5)]
# teal2 <- teal[, c(1, 2, 6:12)]
# teal.mer <- merge(teal1, teal2, by = 'wl')
# head(teal.mer)
# par(mfrow = c(1, 2))
# plot(teal.mer)
# plot(teal)
# 
# ## End(Not run)

Run the code above in your browser using DataLab