summary-mass_dataset: get_sample_number

get_sample_numberR Documentation

get_sample_number

Description

Number of samples

Number of variables

Sample IDs

Variable IDs

Get missing value number/percentage in expression data.

###old version #' @title apply #' @method apply mass_dataset #' @param X X #' @param MARGIN MARGIN #' @param FUN FUN #' @param ... ... #' @param simplify simplify #' @export #' @rdname summary-mass_dataset #' @return result

#' @title intersect #' @method intersect mass_dataset #' @param x x #' @param y y #' @export #' @rdname summary-mass_dataset #' @return result

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")
)

## S3 method for class 'mass_dataset'
dim(x)

## S3 method for class 'mass_dataset'
nrow(x)

## S3 method for class 'mass_dataset'
ncol(x)

## S3 method for class 'mass_dataset'
colnames(x)

## S3 method for class 'mass_dataset'
rownames(x)

## S4 method for signature 'mass_dataset'
apply(X, MARGIN, FUN, ..., simplify = TRUE)

## S4 method for signature 'mass_dataset,mass_dataset'
intersect(x, y)

## S3 method for class 'mass_dataset'
summary(object, ...)

## S3 method for class 'mass_dataset'
length(x)

## S3 method for class 'mass_dataset'
names(x)

## S3 method for class 'mass_dataset'
dimnames(x)

## S3 method for class 'mass_dataset'
is.na(x)

Arguments

object

object

by

total: Missing value number in total. sample: Missing value number in each sample. variable: Missing value number in each variable.

show_by

number: missing value number. percentage: missing value percentage.

x

x

X

X

MARGIN

MARGIN

FUN

FUN

...

other parameters

simplify

simplify

y

y

Details

apply.mass_dataset = function(X, MARGIN, FUN, ..., simplify = TRUE) apply(as.matrix(X@expression_data), MARGIN, FUN, ..., simplify = simplify)

intersect.mass_dataset = function(x, y) intersect(x@sample_info$sample_id, y@sample_info$sample_id)

Value

A numeric.

A numeric.

A character vector.

A character vector.

A numeric (vector).

message

message

message

message

message

result

result

vector object

vector object

vector object

message

Author(s)

Xiaotao Shen shenxt1990@outlook.com

Examples

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)
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)
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)
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))
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. 24, 2022, 8:32 p.m.