Learn R Programming

MantaID (version 1.0.4)

mi_clean_data: Reshape data and delete meaningless rows.

Description

Reshape data and delete meaningless rows.

Usage

mi_clean_data(data, cols = everything(), placeholder = c("-"))

Value

A tibble with two columns("ID" and "class")

Arguments

data

A dataframe or tibble or data.table or matrix. Names of the column will be regard as the class of ID included in column.

cols

Character vectors. Columns of data that contain the IDs

placeholder

Character vectors. IDs included in placeholder will be omitted.

Examples

Run this code
data <- tibble::tibble(
  "class1" = c("A", "B", "C", "D"),
  "class2" = c("E", "F", "G", "H"),
  "class3" = c("L", "M", "-", "O")
)
mi_clean_data(data)

Run the code above in your browser using DataLab