cjb.misc: Miscellaneous functions

Description Usage Arguments

Description

A group of functions for miscellaneous usage.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
dist_cos(a, b)

dist_euc(a, b)

get_mode(v, na.rm = TRUE, multi = FALSE)

cv(x)

perm(n)

consistSymbol(a, r)

strGrep(query, target, fixed = TRUE, vectorout = FALSE, ...)

gsub_multi(
  df,
  column = "Variant_Classification",
  sub = list(Translation_Start_Site = c("De_novo_Start_InFrame",
    "De_novo_Start_OutOfFrame", "Start_Codon_Del", "Start_Codon_SNP"), Frame_Shift_Indel
    = c("Frame_Shift_Del", "Frame_Shift_Ins"), In_Frame_Indel = c("In_Frame_Ins",
    "In_Frame_Del"))
)

Arguments

a, b, x, r

numeric vector. r for reference

v

any vector

multi

when TRUE, return a vector when multiple outcome are possible; when FALSE, only output the first one of them.

n

integer

query, target

vectors of the query and target for the grep

vectorout

if TRUE, the return the first match of each item in the query, thus the output is a vector, not a list.

df

dataframe

column

the column to be targeted by gsub

sub

the list with names as the replacement and the content as the matching items


brightchan/cjbmisc documentation built on Nov. 5, 2021, 4:12 p.m.