virtualArrayMergeRecurse: Merge a list of data.frames by common rows

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

Description

A list of data.frames is merged together by rows common to all data.frames. The column by which the merging is performed can be selected with "by".

Usage

1
virtualArrayMergeRecurse(dfs, by, ...)

Arguments

dfs

A list of data.frames

by

Select the columns to be used for the comparison

...

Parameters passed on to the "merge" function.

Details

The function was adopted from the "reshape" package and modified to be suitable to handle problems arising when combining data from different microarray platforms in the "virtualArray" package. This function is normally only called by "virtualArray.ExpressionSet". It can be used, however, to merge several data.frames by common rows, whereas rows that do not match between the data.frames are discarded.

Value

A data.frame consisting of the matching parts of the input data.frames.

Author(s)

Andreas heider (2011)

See Also

virtualArray-package, virtualArray.ExpressionSet, virtualArrayCompile

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## we set up 2 example data.frames
authors <- data.frame(
name = I(c("Tukey", "Venables", "Tierney", "Ripley", "McNeil")),
nationality = c("US", "Australia", "US", "UK", "Australia"),
deceased = c("yes", rep("no", 4)))
books <- data.frame(
name = I(c("Tukey", "Venables", "Tierney",
"Ripley", "Ripley", "McNeil", "R Core")),
title = c("Exploratory Data Analysis",
"Modern Applied Statistics ...",
"LISP-STAT",
"Spatial Statistics", "Stochastic Simulation",
"Interactive Data Analysis",
"An Introduction to R"),
other.author = c(NA, "Ripley", NA, NA, NA, NA,
	  "Venables & Smith"))
## let's have a look at the data
authors
books
## we store the data.frames in a list
my_dfs <- list(authors,books)
## now we can combine the 2 data.frames
virtualArrayMergeRecurse(my_dfs,by="name")

virtualArray documentation built on Sept. 12, 2016, 6:10 a.m.