New functions:
matchAll
: Variant of basematch()
that returns all positional matches ofx
intable
, instead of only returning the first match. Differs from basematch()
in that the function always errors on any match failures instead of returningNA
.notDupes
: Works likedupes()
, but only returns values that are not duplicated.
Minor changes:
shell
: Setprint
argument toTRUE
by default, rather thaninteractive()
, which improves console output during scripts invoked byRscript
instead of running directly in an R session.- Updated lintr checks.
Minor changes:
showHeader
: Improved edge case handling ofDFrameList
class.
New functions:
dupes
: Return unique values that result inTRUE
via baseduplicated
. See alsogoalie::isDuplicate
for details.pkgCacheDir
: Return the directory path for a package's file cache.strExtract
: Base R variant ofstringi::stri_extract_first
.strExtractAll
: Base R variant ofstringi::stri_extract_all
.strMatch
: Base R variant ofstringi::stri_match_first
.strMatchAll
: Base R variant ofstringi::stri_match_all
.strPad
: Base R variant ofstringr::str_pad
.strRemoveEmpty
: Base R variant ofstringi::stri_remove_empty
.strReplaceNa
: Base R variant ofstringi::stri_replace_na
.strSplit
: Base R variant ofstringi::str_split_fixed
.
Major changes:
- Now enforcing strict camel case naming of all functions.
- Renamed
pasteURL
topasteUrl
. - Renamed
strsplit
tostrSplit
(note case).
Minor changes:
headtail
: Now returns character instead of printing to the console.matchNested
: Simplified internal code by usinglengths
.showSlotInfo
: Reworked internal code.
Minor changes:
pasteURL
: Hardened against unwanted recycling, which is allowed in basepaste
but undesirable here. Also added an assert check to ensure that URL is always returning, containing"://"
. This edge case can happen when user uses function withprotocol
set to"none"
. Also added support for input of a character vector as the first argument alone, which can be useful for passing in variables.
New functions:
strsplit2
: This function works like basestrsplit
but consistently splits into a character matrix for easier extraction of values. Works like stringi and stringr variants but designed to be as simple as possible without requiring a non-base R dependency.
Minor changes:
euclidean
: Reworked so that generic no longer requiresy
. We have modified this downstream in the pending DepMapAnalysis package update.
New functions:
keepOnlyAtomicCols
: New utility function that removes complex non-atomic columns (e.g.list
) from aDFrame
ordata.frame
class object.
Minor changes:
showHeader
: Improved header for S4DFrame
, which contains rows and columns. For classes that extendAnnotated
but don't supportdim
, still returns legacy length information.- Removed
forceDetach
function, as it is no longer used in any other Acid Genomics packages.
New functions:
randomString
: Random string generator.
Minor changes:
tempdir2
: Now callsrandomString
internally to generate a unique temporary directory that is simpler and performs more consistently across platforms.
Minor changes:
pasteURL
now automatically encodes URLs viautils::URLencode
. This is helpful for improving consistent handling of complex URLs. We ran into differences in handling between httr and httr2 for URLs containing spaces. Note that goalieisURL
will now returnFALSE
for non-encoded URLs.
New functions:
cpus
: Return the number of total CPUs available.ram
: Return the amount of total or free ram, in GB by default.
Minor changes:
initDir
is now vectorized and supports multiple directories.
Minor changes:
- Renamed all class definitions to
DFrame
fromDataFrame
.
New functions:
- Now re-exporting new
quietly
function from goalie.
New functions:
matchNested
: Match recursively across columns forDataFrame
method, and per element forlist
method. This is very useful for quick matching of cancer cell line name variants (Cellosaurus) and gene name aliases (HGNC, NCBI in AcidGenomes).
Minor changes:
- Removed defunct
matchArgsToDoCall
fromNAMESPACE
.
Minor changes:
- Removed
requireNamespaces
as a reexport.
Minor changes:
requireNamespaces
: Migrated this function to goalie. Still reexporting this function in the NAMESPACE, but that likely will change with a future update.
Minor changes:
- Deprecated
minorVersion
in favor ofmajorMinorVersion
, which improves legibility. Added asserts against""
andNA
input. Improved code coverage and support for input of a major version alone here (e.g."1"
instead of"1.0"
). - Now using
requireNamespaces
instead ofrequireNamespace
consistently across the package, to improve error messages.
New functions:
euclidean
: Calculate Euclidean distance of two numeric vectors.zscore
: Calculate Z score for an input numeric vector or matrix. Note that matrix method defaults to row-wise scaling, defined byMARGIN
argument. This convention is intended to match recommended R defaults, and also to work as expected with sample (columns) x gene (rows) matrix, commonly used for gene expression inSummarizedExperiment
class objects.
New functions:
truncateString
: Simple utility function that smartly adds ellipsis (...
) when necessary to a long character string. Don't want to export this astruncate
, which is defined in base R for connections.
Minor changes:
shell
: Improved interactive printing and error message handling. The function now attempts to automatically handle~
character, when defined at the beginning of an argument.
Minor changes:
shell
: Added support forenv
, which allows for environment variable definition inside the child process. Refer toprocessx::run
andsystem2
for details.
Minor changes:
requireNamespaces
: Made error message regardingNAMESPACE
more informative. Now indicates that user needs to install a missing package.- Miscellaneous documentation updates, based on roxygen2 changes.
Minor changes:
unlink2
: Added assert check to ensure files and/or directories are successfully deleted. Callsfile.exists
internally, which checks both files and directories.
New functions:
tempdir2
: Temporary directory generator that improves upon base Rtempdir
conventions, ensuring that a new unique directory is created per call.unlink2
: Hardened variant ofunlink
that provides better file system compatibility with Windows. Function will intentionally error if file or directory does not exist on disk.
Minor changes:
- Improved internal consistency of
normalizePath
calls, using platformfsep
forwinslash
, similar to conventions used inrealpath
. This helps improve consistency of messages and file path output on Windows. - Fixed unit test compatibility on Windows.
Minor changes:
- Updated package to use testthat 3e and updated lintr checks.
fileExt
: Addedpattern
formal, which lets us override compressed file handling in other packages.compress
: Improved handling of ZIP files, to no longer rely on internalsetwd
call. Now usingwithr::with_dir
temporary approach instead.compress
anddecompress
: Reformatted internal code to pass lintr checks.forceDetach
: Simplify internal code using a for loop.- Now using
Map
internally instead ofmapply
.
New functions:
- Migrated
gitCurrentBranch
andgitDefaultBranch
from r-koopa here.
Minor changes:
shell
: AddedreturnStdout
argument, which helps parse stdout.fileExt
: Added option to override defaultextPattern
match.
Major changes:
- Updated minimum R dependency version to 4.2
- Reduced the number of strong dependencies, migrating AcidCLI, stats, and
utils to
Suggests
fromImports
.
Minor changes:
- Improved formatting consistency using styler package.
Minor changes:
- Ordered S4 method exports alphabetically by class, where applicable.
compress
/decompress
: Simplified default formals and documentation. User can no longer setremove
oroverwrite
globally with"acid.compress.remove"
or"acid.overwrite"
, respectively.- Removed
formalsList
from NAMESPACE, in favor of a reworked approach across packages that previously inherited these values (in development). printString
: Improved and cleaned up documentation.- Updated working examples to use
DataFrame
object instead ofDFrame
, where applicable. This requires an update to AcidTest package. compress
: Bug fix for ZIP file compression handling outside of working directory. Incorrectly usedbasename
argument internally. Unfortunately need to change the working directory internally to get this working correctly.
Minor changes:
- Cleaned up the NAMESPACE a bit, removing some deprecated functions:
metadataBlacklist
(in favor ofmetadataDenylist
) andbapply
, which should only be defined in goalie package. - Reexporting
tar
from untils package alongsideuntar
, for consistency.
Minor changes:
parentDirectory
: Added support for handling URLs.
New functions:
collapseToPathString
: Previously used internally, now exporting so we can use in koopa dependency package.
New functions:
parentDirectory
(parentDir
): Allows for each return of nested parent directories, similar to approach used in koopa shell package (parent_dir
).
Minor changes:
realpath
: Now keeps track of names, if defined.
Minor changes:
shell
Added some more useful options for subprocess handling and logging:wd
,stdoutFile
,stderrFile
, as well asstderrToStdout
.
New functions:
- Added new system path modifier functions, based on code previously defined in
koopa shell package:
addToPathStart
,addToPathEnd
,removeFromPath
. - Also added some useful path string parsing functions:
splitPathString
anduniquePathString
.
Major changes:
shell
: Reworked internal code to handoff toprocessx::run
instead of usingbase::system2
. Simplified console output handling using a singleprint
argument.
Minor changes:
- Reworked package to use AcidCLI for improved error messages, which are now
called via
abort
instead ofstop
internally.
New functions:
simpleClass
: Added utility function for simple class checks, primarily intended for unit testing with testthat package.
Minor changes:
standardizeCall
: Updated handling of dots handoff tomatch.call
in R 4.1.- Now importing
median
andquantile
functions from AcidGenerics, which use S4 defined in IRanges, rather than the base version defined in stats.
Minor changes:
- Including
data
andmedian
as reexports.
Minor changes:
- Added
install.packages
as a reexport, which is used by r-koopa. - Also including
head
andtail
as reexports.
Minor changes:
- Deprecating
metadataBlacklist
in favor ofmetadataDenylist
.
Minor changes:
- Migrated
printString
back here from goalie package. showHeader
now checks forpackageVersion
inside of metadata as default instead ofversion
.
Minor changes:
- Reexporting
URLencode
from utils, which is used downstream in Cellosaurus package.
Minor changes:
- Including
formula
anduntar
as reexports, which are used in the WormBase package.
Minor changes:
- Including
download.file
as a reexport from utils.
Minor changes:
- Now reexporting all functions used in other Acid Genomics packages defined in base/recommended R packages here, including: grDevices, grid, methods, and stats, utils.
Major changes:
- Migrated
geometricMean
andsem
methods from basejump. - Migrated
showHeader
from basejump. - Migrated
coerceToList
from basejump. - Migrated log ratio functions from basejump.
- Migrated intersection functions from basejump.
Minor changes:
- Made
matchArgsToDoCall
function defunct. Doesn't always evaluate arguments correctly when called inside nested functions or complex S4 stacks.
New functions:
- Added
classContains
utility function.
Minor changes:
pasteURL
: Added support for rsync as a protocol. Using this in future update in AcidGenomes package for downloading from UCSC server.
Minor changes:
- Removed
sampleId
frommetadataBlacklist
global. pasteURL
now supports "s3" as a protocol value.
Minor changes:
- Now importing new AcidCLI package, to improve CLI messages.
Major changes:
- Reworked internal function organization a bit, handing off some functions back into the goalie package.
- Now that goalie doesn't depend on AcidBase, we can import and use the superior assert checks defined in the package.
Minor changes:
download
: Function now recursively creates destination file parent directory if necessary.pasteURL
: Now defaulting to no protocol (e.g. "https") by default. This makes pasting of an existing URL with subdirectories easier.
New functions:
- Added
download
, which acts as a hardened wrapper forutils::download.file
. Annoying,download.file
returns status codes but does not intentionally error on any unsuccessful downloads. Our wrapper ensures that R always errors on any file download issue. It also sets a longer timeout internally, to avoid any potential issues with thetimeout
option being defined inRprofile
.
compress
anddecompress
were found to potentially generate integer overflow warnings on very large files, due to R using 32-bit integers. This issue has been resolving by ensuring the internalnbytes
counter is set asnumeric
instead. See related Stack Overflow post for details on integer overflows in R.sem
: RequiresAsIs
class support, to work inside dplyr summarize calls.- Now need to import BiocGenerics, for proper import of
AsIs
S4 class, which is anoldClass
of the S3 class.
New functions:
sem
: Added support for standard error of the mean calculation.
- Fixed reference to AcidPlots package, renamed from previous "acidplots".
New functions:
- Migrated
headtail
atomic, matrix, and data.frame methods here from basejump. The methods that work on S4 objects, such as DataFrame, Matrix, GRanges, and SummarizedExperiment are still defined in basejump. showSlotInfo
: Migrated from basejump, so we can use in AcidGenomes.
New functions:
- Added
forceDetach
, previously used internally inside basejump. - Updated documentation to inherit from AcidRoxygen instead of acidroxygen.
Major changes:
- Renamed package from acidbase to AcidBase.
Minor changes:
- Migrated some globals previously exported in basejump.
- Updated
formalsList
to consolidate params from basejump.
Minor changes:
- Bug fix for
realpath
file path resolution using..
.
Major changes:
- Migrated
parseArgs
andpositionalArgs
out of package.
Minor changes:
- Maintenance release, increasing minimum R dependency to 4.0.
Minor changes:
formalsList
: Addedacid.import.make.names
global.
Minor changes:
positionalArgs
: Function now intentionally errors when no positional arguments are defined.
Minor changes:
shell
: Theargs
argument has been changed to""
by default so that onlycommand
argument is required as input.
New functions:
majorVersion
,minorVersion
,sanitizeVersion
: Additional version utilites that help extraction major and minor release versions.sanitizeVersion
helps strip extra characters at the end of version strings commonly found in the return of some shell commands (e.g. via--version
command).shell
: Wrapper for basesystem2
function.
New functions:
parseArgs
andpositionalArgs
: Migrated these functions previously defined inside koopa shell bootloader package.requireNamespaces
: Parameterized variant ofrequireNamespace
that allows for easy loading of multiple package namespaces in a single call.
Minor changes:
- Documentation fixes to pass CRAN release checks.
- Switched license from MIT to GPL-3.
New functions:
compress
,decompress
: Added dynamic file compression/decompression support for GZ, BZ2, XZ, and ZIP files. Inspired by approach used in R.utilscompressFile
anddecompressFile
.
Minor changes:
fileDepth
: Updated unit test to work reliably on macOS.
Minor changes:
standardizeCall
: Removed extra unnecessary assert check.
New functions:
- Added new
fileDepth
function.
Minor changes:
- Migrated
realpath
from brio package. Reworked slightly to not depend on any assert checks from goalie package. Now this function essentially wrapsnormalizePath
but provides a more informative error message. basenameSansExt
: Minor tweak to ensure that files without an extension still return basename as expected.
- Initial release.