mass_dataset-summary: Get Some Information of a mass_dataset Object

get_sample_numberR Documentation

Get Some Information of a mass_dataset Object

Description

These functions returns the information of a mass_dataset object.

Usage

get_sample_number(object)

get_variable_number(object)

get_sample_id(object)

get_variable_id(object)

get_mv_number(
  object,
  by = c("total", "sample", "variable"),
  show_by = c("number", "percentage")
)

Arguments

object

A mass_dataset object.

by

A character string specifying how to count missing values. Options are "total", "sample", or "variable". Default is "total".

show_by

A character string specifying the format to show the result. Options are "number" or "percentage". Default is "number".

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Examples

###get_sample_number
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,
  )
 get_sample_number(object = object)
###get_variable_number
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,
  )
 get_variable_number(object = object)
###get_sample_id
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,
  )
 get_sample_id(object = object)
###get_variable_id
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,
  )
 head(get_variable_id(object = object))
###get_mv_number
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,
  )
object
head(get_variable_id(object = object))
get_mv_number(object)
get_mv_number(object, by = "sample")
head(get_mv_number(object, by = "variable", "percentage"))

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