sub_bed: Replace extension '.bed'

View source: R/bed-class.R

sub_bedR Documentation

Replace extension '.bed'

Description

Replace extension '.bed'

Usage

sub_bed(path, replacement = "", stop_if_not_ext = TRUE)

Arguments

path

String with extension '.bed'.

replacement

Replacement of '.bed'. Default replaces by nothing. Can be useful to replace e.g. by '.bim' or '.fam'.

stop_if_not_ext

If replacement != "", whether to error if replacement is not an extension (starting with a '.').

Value

String with extension '.bed' replaced by replacement.

Examples

path <- "toto.bed"
sub_bed(path)
sub_bed(path, ".bim")
sub_bed(path, ".fam")
sub_bed(path, "_QC", stop_if_not_ext = FALSE)

bigsnpr documentation built on March 31, 2023, 10:37 p.m.