View source: R/merge_mass_dataset.R
merge_mass_dataset | R Documentation |
Merge two mass_dataset objects. More information can be found here https://tidymass.github.io/massdataset/articles/process_info.html
merge_mass_dataset(
x,
y,
sample_direction = c("left", "right", "full", "inner"),
variable_direction = c("left", "right", "full", "inner"),
sample_by = c("sample_id"),
variable_by = c("variable_id", "mz", "rt")
)
x |
(required) A mass_dataset class object. |
y |
(required) A mass_dataset class object. |
sample_direction |
How to merge samples, should be left, right, inner or full. See ?left_join |
variable_direction |
How to merge variables, should be left, right, inner or full. |
sample_by |
merge samples by what columns from sample_info. |
variable_by |
merge variables by what columns from variable_info |
A merged mass_dataset.
Xiaotao Shen shenxt1990@outlook.com
data("expression_data")
data("sample_info")
data("variable_info")
object =
create_mass_dataset(
expression_data = expression_data,
sample_info = sample_info,
variable_info = variable_info,
)
x = object[1:3, 5:7]
y = object[2:4, 6:8]
####full merge for samples and variables
z1 =
merge_mass_dataset(
x = x,
y = y,
sample_direction = "full",
variable_direction = "full"
)
####inner merge for samples and full merge for variables
z2 =
merge_mass_dataset(
x = x,
y = y,
sample_direction = "inner",
variable_direction = "full"
)
extract_expression_data(x)
extract_expression_data(y)
extract_expression_data(z1)
extract_expression_data(z2)
######combine pos and neg
x = object[1:3, 5:7]
y = object[4:6, 6:8]
z3 =
merge_mass_dataset(
x = x,
y = y,
sample_direction = "full",
variable_direction = "full"
)
extract_expression_data(z3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.