- Home
- CRAN
**gtx**: Genetics ToolboX**sanitise.whitespace**: Remove leading and trailing spaces; convert double spaces to...

# Remove leading and trailing spaces; convert double spaces to single spaces.

### Description

Convenience function for a series of gsub() calls.

### Usage

1 |

### Arguments

`tt` |
a character vector. |

### Value

A character vector with leading and trailing spaces removed, and double spaces converted to single spaces.

### Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

### Examples

1 | ```
sanitise.whitespace(c(" A to G", "A to G", "A to G", "A to G "))
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.

- abf.normal: Calculate approximate Bayes factor (ABF) for normal prior.
- abf.t: Calculate approximate Bayes factor (ABF) for t distribution...
- abf.Wakefield: Calculate approximate Bayes factor (ABF) using method of...
- agtstats: Hypertension association statistics for SNPs near the AGT...
- align.snpdata.coding: Update genotype coding when there are coded allele...
- allelesAB: Paste together (vectors of) A and B alleles after sorting...
- bp.scores: Genetic risk scores for blood pressure.
- cad.scores: Genetic risk scores for coronary artery disease risk
- coeff.extract: Coefficient extractor for fitted models.
- combine.moments2: Builds a matrix of second moments for a set of individuals,...
- contrasting.rainbow: Rainbow of colours permuted to maximise contrast.
- est.moments2: Estimate regression coefficients using quadratic...
- fitmix: Fit finite mixture of univariate Gaussian densities to data.
- fitmix.plot: Plot empirical density and components and total density for...
- fitmix.r2: For finite mixture of univariate Gaussian densities, computes...
- fitmix.simulate: Simulate from finite mixture of univariate Gaussian...
- gls.approx.logistic: Calculate weights and transformed phenotype so that one...
- grs.filter.Qrs: Filter SNPs for inclusion in genetic risk score using...
- grs.make.scores: Make genetic risk scores from individual-level data.
- grs.onesnp.apply: Convenience tool to fit a series of single-SNP models.
- grs.plot: Diagnostic plot for genetic risk score calculation from...
- grs.summary: Genetic risk score calculation from summary statistics.
- gtx-package: Genetics ToolboX
- gtx.params: Parameter format for multi-SNP analyses
- hapmap.read.haplotypes: Read hapmap haplotypes.
- hapmap.snpdata: Extract individual level snp/haplotype data from HapMap
- height.scores: Genetic risk score for height.
- lipid.cad.scores: Genetic risk scores for serum lipid levels and coronary...
- lipid.scores: Genetic risk scores for serum lipid levels
- liver.scores: Genetic risk scores for liver enzyme traits.
- lm.moments2: Fit normal linear model using pre-built matrix of second...
- magic.scores: Genetic risk scores for glucose/insulin traits.
- make.moments2: Build matrix of second moments from subject-specific data.
- mincover: Compute minimum size of cover of overlapping intervals.
- moments2: Class for summary statistic matrix of second moments.
- mthfrex: Simulated example finemapping genotype and phenotype data.
- multimatch: Match with multiple matching possible.
- multipheno.T2: Multi-phenotype test for association
- ncp: Compute non-centrality parameter of chi squared distribution.
- parse.snps: Parse text representation of a SNP embedded in flanking...
- read.snpdata.impute: Read genotype dosages in the format output by IMPUTE.
- read.snpdata.mach: Read genotype dosages in the format output by MACH
- read.snpdata.minimac: Read genotype dosages in the format output by minimac
- read.snpdata.plink: Read genotype dosages in the format output by PLINK.
- remap.q2t: Remap coordinates from BLAT query sequence to BLAT target...
- sanitise.whitespace: Remove leading and trailing spaces; convert double spaces to...
- snpdata: Class for SNP genotype and phenotype data.
- snphwe: Exact test of Hardy-Weinberg.
- snphweCounts: Exact test of Hardy-Weinberg.
- snps.BRCA1: Genotyping array annotation for SNPs near the BRCA1 gene.
- stepdown.moments2: Stepwise downward model selection using summary statistic...
- stepup.moments2: Stepwise upward model selection using summary statistic...
- t2dex: Simulated example genotype and longitudinal phenotype data.
- t2d.scores: Genetic risk scores for type 2 diabetes risk.
- test.subsample: Test approximation used in genetic risk score analyses.