convert_msdial2mass_dataset: Convert MS-Dial Data to mass_dataset Object

View source: R/convert_msdial2mass_dataset.R

convert_msdial2mass_datasetR Documentation

Convert MS-Dial Data to mass_dataset Object

Description

This function converts data from MS-Dial into a mass_dataset object. It reads the data either from a given data frame or from a file and processes it to create a mass_dataset object.

Usage

convert_msdial2mass_dataset(x, path = ".", file_name)

Arguments

x

A data frame containing MS-Dial data. If missing, the function will read from a file.

path

The directory where the file is located. Default is the current directory.

file_name

The name of the file to read if x is missing.

Details

The function reads MS-Dial data and processes it to create a mass_dataset object. It extracts sample information, variable information, and expression data. It also performs checks to ensure the data is correctly formatted.

Value

A mass_dataset object containing the processed MS-Dial data.

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Examples

##if you want to read the msdital table,
##use this function
## table <- read.table("msdial_table.csv", sep = ",")
data("msdial_table")
object =
  convert_msdial2mass_dataset(x = msdial_table)
object

tidymass/massdataset documentation built on Sept. 14, 2024, 4:41 p.m.