Last chance! 50% off unlimited learning
Sale ends in
Buy Now
Rdocumentation
powered by
Learn R Programming
⚠️
There's a newer version (2.13.0) of this package.
Take me there.
R.utils (version 0.8.0)
Various programming utilities
Description
This package provides utility classes and methods useful when programming in R and developing R packages.
Copy Link
Link to current version
Version
Version
2.13.0
2.12.3
2.12.2
2.12.1
2.12.0
2.11.0
2.10.1
2.9.2
2.9.1
2.9.0
2.8.0
2.7.0
2.6.0
2.5.0
2.4.0
2.3.0
2.2.0
2.1.0
2.0.2
2.0.1
2.0.0
1.34.0
1.33.0
1.32.4
1.29.8
1.28.4
1.27.1
1.26.2
1.26.0
1.25.2
1.23.2
1.19.5
1.19.3
1.18.0
1.16.2
1.16.0
1.12.1
1.12.0
1.9.11
1.9.9
1.9.7
1.9.6
1.9.4
1.9.3
1.8.7
1.8.5
1.8.2
1.8.1
1.7.8
1.7.7
1.7.5
1.7.4
1.7.3
1.7.2
1.7.0
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.8
1.5.7
1.5.6
1.5.3
1.5.2
1.5.0
1.4.4
1.4.3
1.4.2
1.4.0
1.3.3
1.3.2
1.3.0
1.2.4
1.2.2
1.2.0
1.1.7
1.1.1
1.1.0
1.0.1
0.9.8
0.9.7
0.9.6
0.9.5
0.9.1
0.9.0
0.8.9
0.8.0
0.7.9
0.7.7
0.5.5
Install
install.packages('R.utils')
Monthly Downloads
226,490
Version
0.8.0
License
LGPL version 2.1 or newer (the releases)
Maintainer
Henrik Bengtsson
Last Published
February 24th, 2025
Functions in R.utils (0.8.0)
Search all functions
as.list.Options
Gets a list representation of the options
Non-documented objects
Non-documented objects
evaluate.Verbose
Evaluates a function and prints its results if above threshold
Settings
Class for applicational settings
Options
The Options class
getBuiltinRversion.GString
Gets the current R version
attachLocally.list
Assigns an objects elements locally
filePath
Construct the path to a file from components and expands Windows Shortcuts along the pathname from root to leaf
cat.Verbose
Concatenates and prints objects if above threshold
inherits.Assert
Static method asserting that an object inherits from of a certain class
increase.ProgressBar
Increases (steps) progress bar
addFinalizerToLast
Modifies .Last() to call 'finalizeSession()
getRegularExpression.Arguments
Gets a valid regular expression pattern
listDirectory
Gets the file names in the directory
isMatrix.Assert
Static method asserting thatan object is a matrix
doCall
Executes a function call with option to ignore unused arguments
pushState.Verbose
Pushes the current indentation state of the Verbose object
gunzip
Gunzip a file
png2
A PNG device for Bitmap Files via GhostScript
check.Assert
Static method asserting that a generic condition is true
NullVerbose
A Verbose class ignoring everything
asByte.Java
Converts a numeric to a Java byte
getBuiltinUsername.GString
Gets the username of the user running R
asInt.Java
Converts an numeric to a Java integer
getHostname.System
Retrieves the computer name of the current host
getUsername.System
Retrieves the name of the user running R
System
Static class to query information about the system
setLabel.TextStatusBar
Sets the value of a label
isOpen.character
Checks if there is an open connection in Rto a file
setTimestampFormat.Verbose
Sets the default timestamp format
getLoadedPathname.Settings
Gets the pathname of the settings file loaded
writeByte.Java
Writes a byte (8 bits) to a connection in Java format
Verbose
Class to writing verbose messages to a connection or file
getVector.Arguments
Validates a vector
isDone.ProgressBar
Checks if progress bar is completed
readByte.Java
Reads a Java formatted byte (8 bits) from a connection
splitByPattern
Splits a single character string by pattern
setProgress.ProgressBar
Sets current progress
jpeg2
A JPEG device for Bitmap Files via GhostScript
hasUrlProtocol
Checks if one or several pathnames has a URL protocol
timestamp.Verbose
Writes a timestamp
R.utils-package
Package R.utils
getIntegers.Arguments
Coerces to a integer vector and validates
as.character.GString
Gets the processed character string
currentTimeMillis.System
Get the current time in milliseconds
isOn.NullVerbose
Checks if the output is on
insert
Insert values to a vector at certain positions
header.Verbose
Writes a header
as.character.ProgressBar
Gets a string description of the progress bar
capitalize
Capitalizes/decapitalizes each character string in a vector
isOn.Verbose
Checks if the output is on
update.ProgressBar
Updates progress bar
reset.ProgressBar
Reset progress bar
seqToIntervals
Gets all contigous intervals of a vector of indices
writeRaw.Verbose
Writes objects if above threshold
sourceDirectory
Sources files recursively to either local or global environment
ProgressBar
Provides text based counting progress bar
newline.Verbose
Writes one or several empty lines
saveAnywhere.Settings
Saves settings to file
callHooks
Call hook functions by hook name
getRaw.GString
Gets the unprocessed GString
VComments
The VComments class
isFile
Checks if the file specification is a file
isUrl
Checks if one or several pathnames is URLs
convertComment.VComments
Converts a verbose comment to R code
hasOption.Options
Checks if an option exists
wrap.array
Reshape an array or a matrix by permuting and/or joining dimensions
getBuiltinTime.GString
Gets the current time
isModified.Settings
Checks if settings has been modified compared to whats on file
getTimestampFormat.Verbose
Gets the default timestamp format
findSettings.Settings
Searches for the settings file in one or several directories
seqToHumanReadable
Gets a short human readable string representation of an vector of indices
as.character.binmode
Converts a binary/octal/hexadecimal number into a string
patchCode
Patches installed and loaded packages and more
promptAndSave.Settings
Prompt user to save modified settings
timestampOn.Verbose
Turns automatic timestamping on and off
onSessionExit
Registers a function to be called when the R session finishes
mkdirs
Creates a directory including any necessary but nonexistent parent directories
writeInt.Java
Writes a integer (32 bits) to a connection in Java format
isVisible.Verbose
Checks if a certain verbose level will be shown or not
readTableIndex
Reads a single column from file in table format
finalizeSession
Function to call for finalizing the R session
isVisible.NullVerbose
Checks if a certain verbose level will be shown or not
setValue.ProgressBar
Sets current value
validate.VComments
Validates the compiled lines
setStepLength.ProgressBar
Sets default step length
isZero
Checks if a value is (close to) zero or not
as.double.Verbose
Gets a numeric value of this object
names.Options
Gets the full pathname of all (non-list) options
parse.GString
Parses a GString
getIndices.Arguments
Coerces to a integer vector and validates
getBuiltinPid.GString
Gets the process id of the current R session
setMaxValue.ProgressBar
Sets maximum value
setDefaultLevel.Verbose
Sets the current default verbose level
getNumerics.Arguments
Coerces to a numeric vector and validates
readInt.Java
Reads a Java formatted int (32 bits) from a connection
reset.SmartComments
Resets a SmartComments compiler
isDirectory
Checks if the file specification is a directory
writeShort.Java
Writes a short (16 bits) to a connection in Java format
Assert
The Assert class
parse.SmartComments
Parses one single smart comment
readUTF.Java
Reads a Java (UTF-8) formatted string from a connection
Arguments
Static class to validate and process arguments
parseDebian.System
Parses a string, file or connection for Debian formatted parameters
readTable
Reads a file in table format
SmartComments
Abstract class SmartComments
updateLabels.TextStatusBar
Sets the new values of given labels and updates the status bar
validate.SmartComments
Validates the compiled lines
isAbsolutePath
Checks if this pathname is absolute
isScalar.Assert
Static method asserting thatan object is a single value
callHooks.function
Call hook functions
loadAnywhere.Settings
Loads settings from file
toUrl
Converts a pathname into a URL
remove.FileProgressBar
Removes the progress file for a file progress bar
update.TextStatusBar
Updates the status bar (visually)
reset.VComments
Resets a VComments compiler
resetWarnings
Resets recorded warnings
getCharacters.Arguments
Coerces to a character vector and validates
LComments
The LComments class
equals.Verbose
Checks if this object is equal to another
getBuiltinHostname.GString
Gets the hostname of the system running R
getParent
Gets the string of the parent specified by this pathname
TextStatusBar
A status bar at the R prompt that can be updated
enter.Verbose
Writes a message and indents the following output
copyDirectory
Copies a directory
as.character.Verbose
Returns a character string version of this object
as.character.Options
Returns a character string version of this object
eps
EPS graphics device
as.logical.Verbose
Gets a logical value of this object
asLong.Java
Converts a numeric to a Java long
getReadablePathnames.Arguments
Gets a readable pathname
convertComment.SmartComments
Converts a single smart comment to R code
getVariableValue.GString
Gets a variable value given a name and attributes
displayCode
Displays the contents of a text file with line numbers and more
commandArgs
Extract Command Line Arguments
exit.Verbose
Writes a message and unindents the following output
getOption.Options
Gets an option
detachPackage
Detaches a packages by name
printf.Verbose
Formats and prints object if above threshold
on.Verbose
Turn on the output
getThreshold.Verbose
Gets current verbose threshold
equals.Options
Checks if this object is equal to another Options object
relibrary
Reloads a package
setThreshold.Verbose
Sets verbose threshold
findGraphicsDevice.System
Searches for a working PNG device
getVerbose.Arguments
Coerces to Verbose object
setLabels.TextStatusBar
Sets new values of given labels
openBrowser.System
Opens an HTML document using the OS default HTML browser
GString
Character string with advanced substitutions
getBuiltinRhome.GString
Gets the path where R is installed
extract.array
Extract a subset of an array, matrix or a vector with unknown dimensions
getAbsolutePath
Gets the absolute pathname string
findGhostscript.System
Searches for the ghostview binary on the current system
ruler.Verbose
Writes a ruler
warnings.Verbose
Outputs any warnings recorded
getBuiltinDate.GString
Gets the current date
getEnvironment.Arguments
Gets an existing environment
sourceTo
Parses and evaluates code from a file or a connection
writeRaw.NullVerbose
All output methods
getBuiltinDatetime.GString
Gets the current date and time
summary.Verbose
Generates a summary of an object if above threshold
capture.Verbose
Captures output of a function
compile.SmartComments
Preprocess a vector of code lines
intToBin
Converts an integer to a binary/octal/hexadecimal number
isVector.Assert
Static method asserting thatan object is a vector
newline.TextStatusBar
Writes a newline
readWindowsShortcut
Reads a Microsoft Windows Shortcut (.lnk file)
str.Verbose
Prints the structure of an object if above threshold
FileProgressBar
A progress bar that sets the size of a file accordingly
unwrap.array
Unwrap an array, matrix or a vector to an array of more dimensions
Java
Static class for Java related methods
getBuiltinOs.GString
Gets the operating system of the running machine
getBarString.ProgressBar
Gets the progress bar string to be displayed
getRelativePath
Gets the relative pathname relative to a directory
getWritablePathname.Arguments
Gets a writable pathname
print.Verbose
Prints objects if above threshold
off.Verbose
Turn off the output
readShort.Java
Reads a Java formatted short (16 bits) from a connection
getDoubles.Arguments
Coerces to a double vector and validates
lastModified
Gets the time when the file was last modified
nbrOfOptions.Options
Gets the number of options set
setOption.Options
Sets an option
setTicks.ProgressBar
Sets values for which ticks should be visible
str.Options
Prints the structure of the options
writeUTF.Java
Writes a string to a connection in Java format (UTF-8)
asShort.Java
Converts a numeric to a Java short
getLabel.TextStatusBar
Gets the current value of a label
getLeaves.Options
Gets all (non-list) options in a flat list
getLogicals.Arguments
Coerces to a logical vector and validates
getReadablePathname.Arguments
Gets a readable pathname
print.GString
Prints the processed GString
update.FileProgressBar
Updates file progress bar