orderDFAccessions: Order df rows in accession order

Description Usage Arguments Value See Also Examples

View source: R/Unifying_Functions.R

Description

Order df rows in accession order

Usage

1
2
3
4
5
orderDFAccessions(
  df,
  acc_order = c("study", "sample", "experiment", "run", "gsm"),
  na.last = TRUE
)

Arguments

df

Data frame to be ordered (must contain columns corresponding to types specified in acc_order, i.e. study_accession, sample_accession, experiment_accession, run_accession, gsm).

acc_order

A character vector with accession levels to be used for ordering (their order specifies which accession level is taken into account first). Default value lists all possible elements.

na.last

Logical denoting whether NA values should be placed last. Defaults to TRUE.

Value

Data frame with rows ordered accordingly. The row names are reset.

See Also

Other Manipulation functions: filterByTermByAccessionLevel(), filterByTerm()

Examples

1
2
3
4
5
6
# Use for ordering rows within df after manipulating it, e.g.: 
startSpiderSeqRDemo()
df1 <- searchAnywhere("trimkd")
df2 <- searchAnywhere("arabidopsis")
df <- rbind(df1, df2)
df <- orderDFAccessions(df)

ss-lab-cancerunit/SpiderSeqR documentation built on Nov. 2, 2020, 12:18 a.m.