selectdf: Select rows of a dataframe

Description Usage Arguments Value See Also Examples

Description

select rows of a dataframe using a regex on the rownames

Usage

1

Arguments

regex

A regular expression used to select elements

df

A dataframe with named rows

Value

subset of the original dataframe where the rowname matches regex

See Also

Other load tcx functions: load_tcx_dir, load_tcx_file, merge_list, select_list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
df <- t(data.frame("a" = c(1:3), "abba" = c(2:4), "b" = c(3:5)))
df
         [,1] [,2] [,3]
    a       1    2    3
    abba    2    3    4
    b       3    4    5
selectdf(df, "a")
         [,1] [,2] [,3]
    a       1    2    3
    abba    2    3    4
selectdf(df, "b")
         [,1] [,2] [,3]
    abba    2    3    4
    b       3    4    5
selectdf(df, "[[:alpha:]]{4}")
    [1] 2 3 4

VCCRI/CardiacProfileR documentation built on May 25, 2019, 2:22 p.m.