feat: change to custom function for modifying factors

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-12-02 13:58:37 +01:00
commit 987069dd90
No known key found for this signature in database
5 changed files with 188 additions and 14 deletions

23
man/collapse_spaces.Rd Normal file
View file

@ -0,0 +1,23 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{collapse_spaces}
\alias{collapse_spaces}
\title{Substitue spaces/tabs with single space excluding text within quotes}
\usage{
collapse_spaces(x, preserve_newlines = TRUE)
}
\arguments{
\item{x}{character string}
\item{preserve_newlines}{flag to preserve new lines}
}
\value{
character string
}
\description{
Written assisted by Claude.ai. It is long and possibly too complicated,
but it works
}
\examples{
collapse_spaces(c("cyl", "di sp","s e d","d e'dl e'"))
}