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

# S3 method for rspec
merge(x, y, ...)

Arguments

x, y

(required) rspec objects to merge.

...

additional class arguments.

Value

an object of class rspec for use with pavo functions. Will use by = "wl" if unspecified, or automatically append wl to the by argument if one is specified.

See also

Examples

# 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)

# }