Learn R Programming

nat.utils

An R package containing utility functions to support the NeuroAnatomy Toolbox (nat)

Background

This package provides support functions for the nat NeuroAnatomy Toolbox package. Some functions may nevertheless be of general interest. See the online documentation for a for full function listing.

Installation

Released versions

From CRAN. The recommended option for simplicity and since this package is not under heavy development:

install.packages("nat.utils")

Bleeding Edge

Straight from github with Hadley Wickham's remotes package:

if(!require("remotes")) install.packages("remotes")
remotes::install_github('natverse/nat.utils')

Note: Windows users need Rtools to install in this way.

Copy Link

Version

Install

install.packages('nat.utils')

Monthly Downloads

291

Version

0.6.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Last Published

June 7th, 2023

Functions in nat.utils (0.6.1)

ncpus

Return number of cpus (or a default on failure)
read_nl_from_parts

Make a neuronlist object from two separate files
touch

Use unix touch utility to change file's timestamp
zipinfo

Return information about a zip archive using system unzip command
RunCmdForNewerInput

Run a command if input files are newer than outputs
nat.utils-package

Utility functions to support the NeuroAnatomy Toolbox (nat). Includes functions to provide a basic make style system to update files based on timestamp information, file locking and other convenience functions for working with the filesystem
is.gzip

Check if a file is a gzip file
file.swap

Swap names of two files (by renaming first to a temporary file)
abs2rel

Remove common part of two paths, leaving relative path
find_extdata

Construct paths to files in the extdata folder of a package
common_path

Find common prefix of two or more (normalised) file paths
makelock

Make and remove (NFS safe) lock files
gzip.crc

Extract the CRC (32 bit hash) of a gzip file
make_chunks

Split inputs into a number of chunks
zipok

Verify integrity of one or more zip files
save_nl_in_parts

Save a neuronlist object into separate data and metadata parts
split_path

Split file path into individual components (optionally including separators)