moimerge {MLMOI}R Documentation

Merges two molecular datasets.

Description

The function is designed to merge two datasets from separate Excel files. The data in each Excel file is placed in the first worksheet.

Usage

moimerge(
  file1,
  file2,
  nummtd1,
  nummtd2,
  keepmtd = FALSE,
  export = NULL,
  keepwarnings = NULL
)

Arguments

file1

string; specifying the path of the first dataset.

file2

string; specifying the path of the second dataset.

nummtd1

numeric; number of metadata columns (see moimport()) in the first file (default as 0).

nummtd2

numeric; number of metadata columns (see moimport()) in the second file (default as 0).

keepmtd

logical; determining whether metadata (e.g., date) should be retained (default as TRUE).

export

string; the path where the data is stored.

keepwarnings

string; the path where the warnings are stored.

Details

The two datasets should be already in standard format (see moimport()). The datasets are placed in the first worksheet of the two different Excel files. Notice that marker labels (=column labels) need to be unique.

Value

The output is a dataset in standard format which constitutes of an assembly of the input datasets.

Warnings

Warnings are generated if potential inconsistencies are detected. E.g., if the same sample occurs in both datasets and have contradicting metadata entries. The function only prints the first 50 warnings. If the number of warnings are more than 50, the user is recommended to set the argument keepwarnings, in order to save the warnings in an Excel file.

See Also

To import and transform data into standard format, please see the function moimport().

Examples

#The datasets 'testDatamerge1.xlsx' and 'testDatamerge1.xlsx' are already in standard format:

infile1 <- system.file("extdata", "testDatamerge1.xlsx", package = "MLMOI")
infile2 <- system.file("extdata", "testDatamerge2.xlsx", package = "MLMOI")
outfile <- moimerge(infile1, infile2, nummtd1 = 1, nummtd2 = 2, keepmtd = TRUE)


[Package MLMOI version 0.1.2 Index]