Rdocumentation
powered by
Learn R Programming
⚠️
There's a newer version (2.12.3) of this package.
Take me there.
R.utils (version 1.29.8)
Various programming utilities
Description
This package provides utility methods useful when programming and developing R packages.
Copy Link
Link to current version
Version
Version
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
191,979
Version
1.29.8
License
LGPL (>= 2.1)
Maintainer
Henrik Bengtsson
Last Published
January 30th, 2014
Functions in R.utils (1.29.8)
Search all functions
isReplicated
Identifies all entries with replicated values
Java$readUTF
Reads a Java (UTF-8) formatted string from a connection
onGarbageCollect
Registers a function to be called when the R garbage collector is (detected to be) running
FileProgressBar
A progress bar that sets the size of a file accordingly
printf
C-style formatted output
as.logical.Verbose
Gets a logical value of this object
readTable
Reads a file in table format
evalWithTimeout
Evaluate an R expression and interrupts it if it takes too long
isAbsolutePath
Checks if this pathname is absolute
header.Verbose
Writes a header
ProgressBar
Provides text based counting progress bar
System
Static class to query information about the system
as.list.MultiVerbose
Gets a list of Verbose objects
cat.Verbose
Concatenates and prints objects if above threshold
flush.TextStatusBar
Flushes the output
filePath
Construct the path to a file from components and expands Windows Shortcuts along the pathname from root to leaf
as.character.binmode
Converts a binary/octal/hexadecimal number into a string
Java$asLong
Converts a numeric to a Java long
compile.SmartComments
Preprocess a vector of code lines
equals.Options
Checks if this object is equal to another Options object
MultiVerbose
A Verbose class ignoring everything
System$findGraphicsDevice
Searches for a working PNG device
capture.Verbose
Captures output of a function
System$findGhostscript
Searches for a Ghostview executable on the current system
Java$asByte
Converts a numeric to a Java byte
R.utils-package
Package R.utils
Java
Static class for Java related methods
cleanup.FileProgressBar
Removes the progress file for a file progress bar
as.double.Verbose
Gets a numeric value of this object
Arguments$getEnvironment
Gets an existing environment
convertComment.VComments
Converts a verbose comment to R code
attachLocally.list
Assigns an objects elements locally
Options
The Options class
VComments
The VComments class
as.character.Verbose
Returns a character string version of this object
eget
Gets a variable by name
createFileAtomically
Creates a file atomically
bunzip2
Bunzip a file
Settings
Class for applicational settings
TimeoutException
TimeoutException represents timeout errors
createLink
Creates a link to a file or a directory
convertComment.SmartComments
Converts a single smart comment to R code
LComments
The LComments class
Arguments
Static class to validate and process arguments
Non-documented objects
Non-documented objects
evalCapture
Evaluates an expression and captures the code and/or the output
NullVerbose
A Verbose class ignoring everything
callHooks.function
Call hook functions
as.character.Options
Returns a character string version of this object
colClasses
Creates a vector of column classes used for tabular reading
Assert
The Assert class
capitalize
Capitalizes/decapitalizes each character string in a vector
popBackupFile
Drops a backup suffix from the backup pathname
as.list.Options
Gets a list representation of the options
SmartComments
Abstract class SmartComments
off.Verbose
Turn off the output
arrayIndex
Converts vector indices to array indices
addFinalizerToLast
Modifies .Last() to call 'finalizeSession()
Arguments$getVector
Validates a vector
nbrOfOptions.Options
Gets the number of options set
Arguments$getInstanceOf
Gets an instance of the object that is of a particular class
callHooks
Call hook functions by hook name
getRaw.GString
Gets the unprocessed GString
System$currentTimeMillis
Get the current time in milliseconds
getParent
Gets the string of the parent specified by this pathname
enter.Verbose
Writes a message and indents the following output
listDirectory
Gets the file names in the directory
print.Verbose
Prints objects if above threshold
createWindowsShortcut
Creates a Microsoft Windows Shortcut (.lnk file)
doCall
Executes a function call with option to ignore unused arguments
Assert$inherits
Static method asserting that an object inherits from of a certain class
countLines
Counts the number of lines in a text file
newline.TextStatusBar
Writes a newline
increase.ProgressBar
Increases (steps) progress bar
Java$asInt
Converts an numeric to a Java integer
cmdArgsCall
Calls an R function passing command-line arguments
evaluate.Verbose
Evaluates a function and prints its results if above threshold
GString$getBuiltinDatetime
Gets the current date and time
Java$asShort
Converts a numeric to a Java short
as.character.GString
Gets the processed character string
dimNA< -
Sets the dimension of an object with the option to infer one dimension autmatically
Sys.readlink2
Read File Symbolic Links (also on Windows)
commandArgs
Extract command-line arguments
extract.array
Extract a subset of an array, matrix or a vector with unknown dimensions
isFile
Checks if the file specification is a file
findFiles
Finds one or several files in multiple directories
System$parseDebian
Parses a string, file or connection for Debian formatted parameters
GString$getBuiltinDate
Gets the current date
installPackages
Install R packages by name or URL
env
Creates a new environment, evaluates an expression therein, and returns the environment
copyFile
Copies a file atomically
Assert$check
Static method asserting that a generic condition is true
System$getHostname
Retrieves the computer name of the current host
GString$getBuiltinPid
Gets the process id of the current R session
Java$readByte
Reads a Java formatted byte (8 bits) from a connection
isDirectory
Checks if the file specification is a directory
Arguments$getVerbose
Coerces to Verbose object
detachPackage
Detaches a packages by name
GString$getBuiltinHostname
Gets the hostname of the system running R
as.character.ProgressBar
Gets a string description of the progress bar
file.info2
Extract File Information (acknowledging symbolic file links also on Windows)
evaluate.GString
Parses and evaluates a GString
getAbsolutePath
Gets the absolute pathname string
GString$getBuiltinOs
Gets the operating system of the running machine
GString$getBuiltinRhome
Gets the path where R is installed
isVisible.Verbose
Checks if a certain verbose level will be shown or not
isUrl
Checks if one or several pathnames is URLs
isModified.Settings
Checks if settings has been modified compared to whats on file
insert
Insert values to a vector at certain positions
GString$getVariableValue
Gets a variable value given a name and attributes
downloadFile.character
Downloads a file
equals.Verbose
Checks if this object is equal to another
reassignInPackage
Re-assigns a new value to an existing object in a loaded package
splitByPattern
Splits a single character string by pattern
sourceTo
Parses and evaluates code from a file or a connection
mergeIntervals.numeric
Merges intervals
promptAndSave.Settings
Prompt user to save modified settings
setStepLength.ProgressBar
Sets default step length
touchFile
Updates the timestamp of a file
Arguments$getReadablePathnames
Gets a readable pathname
readBinFragments
Reads binary data from disjoint sections of a connection or a file
Assert$isMatrix
Static method asserting thatan object is a matrix
hasUrlProtocol
Checks if one or several pathnames has a URL protocol
getLeaves.Options
Gets all (non-list) options in a flat list
gzip
Gzip/Gunzip a file
Arguments$getFilename
Gets and validates a filename
dataFrame
Allocates a data frame with given column classes
getTimestampFormat.Verbose
Gets the default timestamp format
finalizeSession
Function to call for finalizing the R session
System$openBrowser
Opens an HTML document using the OS default HTML browser
setLabel.TextStatusBar
Sets the value of a label
str.Options
Prints the structure of the options
print.GString
Prints the processed GString
timestampOn.Verbose
Turns automatic timestamping on and off
getBarString.ProgressBar
Gets the progress bar string to be displayed
stext
Writes text in the margin along the sides of a plot
setOption.Options
Sets an option
isPackageLoaded
Checks if a package is loaded or not
isOn.Verbose
Checks if the output is on
GString$getBuiltinTime
Gets the current time
subplots
Creates a grid of subplots
pushTemporaryFile
Appends a temporary suffix to the pathname
seqToHumanReadable
Gets a short human readable string representation of an vector of indices
loadAnywhere.Settings
Loads settings from file
copyDirectory
Copies a directory
Arguments$getWritablePathname
Gets a writable pathname
update.FileProgressBar
Updates file progress bar
setOption
Sets a option in R
isVisible.NullVerbose
Checks if a certain verbose level will be shown or not
displayCode
Displays the contents of a text file with line numbers and more
Assert$isVector
Static method asserting thatan object is a vector
Arguments$getDoubles
Coerces to a double vector and validates
readWindowsShortcut
Reads a Microsoft Windows Shortcut (.lnk file)
getLoadedPathname.Settings
Gets the pathname of the settings file loaded
setDefaultLevel.Verbose
Sets the current default verbose level
newline.Verbose
Writes one or several empty lines
isOn.NullVerbose
Checks if the output is on
getOption.Options
Gets an option
Settings$findSettings
Searches for the settings file in one or several directories
on.Verbose
Turn on the output
summary.Verbose
Generates a summary of an object if above threshold
reset.ProgressBar
Reset progress bar
GString$getBuiltinRversion
Gets the current R version
getRelativePath
Gets the relative pathname relative to a directory
setTimestampFormat.Verbose
Sets the default timestamp format
setProgress.ProgressBar
Sets current progress
writeDataFrame.data.frame
Writes a data.frame to tabular text file
findSourceTraceback
Finds all 'srcfile' objects generated by source() in all call frames
reset.SmartComments
Resets a SmartComments compiler
getThreshold.Verbose
Gets current verbose threshold
Arguments$getLogicals
Coerces to a logical vector and validates
Arguments$getRegularExpression
Gets a valid regular expression pattern
parse.GString
Parses a GString
toUrl
Converts a pathname into a URL
exit.Verbose
Writes a message and unindents the following output
Assert$isScalar
Static method asserting thatan object is a single value
writeRaw.Verbose
Writes objects if above threshold
hpaste
Concatenating vectors into human-readable strings
Arguments$getNumerics
Coerces to a numeric vector and validates
sourceDirectory
Sources files recursively to either local or global environment
isOpen.character
Checks if there is an open connection to a file
isPackageInstalled
Checks if a package is installed or not
Java$writeUTF
Writes a string to a connection in Java format (UTF-8)
validate.VComments
Validates the compiled lines
mapToIntervals.numeric
Maps values to intervals
GString$getBuiltinUsername
Gets the username of the user running R
writeBinFragments
Writes binary data to disjoint sections of a connection or a file
writeRaw.MultiVerbose
Writes to each of the Verbose objects
renameFile
Renames a file (or a directory) atomically/safely
resetWarnings
Resets recorded warnings
intToBin
Converts an integer to a binary/octal/hexadecimal number
systemR
Launches another R process from within R
intervalsToSeq.matrix
Generates a vector of indices from a matrix of intervals
timestamp.Verbose
Writes a timestamp
isDone.ProgressBar
Checks if progress bar is completed
readWindowsShellLink
Reads a Microsoft Windows Shortcut (.lnk file)
isSingle
Identifies all entries that exists exactly ones
writeRaw.NullVerbose
All output methods
use
Attaches or loads packages
loadObject
Method to load object from a file or a connection
Java$readShort
Reads a Java formatted short (16 bits) from a connection
str.Verbose
Prints the structure of an object if above threshold
setValue.ProgressBar
Sets current value
unwrap.array
Unwrap an array, matrix or a vector to an array of more dimensions
update.ProgressBar
Updates progress bar
reset.VComments
Resets a VComments compiler
pushBackupFile
Appends a backup suffix to the pathname
lastModified
Gets the time when the file was last modified
pushState.Verbose
Pushes the current indentation state of the Verbose object
less.Verbose
Creates a cloned instance with a higher threshold
loadToEnv
Method to load objects to a new environment
setThreshold.Verbose
Sets verbose threshold
Java$writeShort
Writes a short (16 bits) to a connection in Java format
updateLabels.TextStatusBar
Sets the new values of given labels and updates the status bar
toCamelCase
Converts a string of words into a merged camel-cased word
readRdHelp
Reads one or more Rd help files in a certain format
resample
Sample values from a set of elements
gcat
Parses, evaluates and outputs a GString
names.Options
Gets the full pathname of all (non-list) options
Java$writeByte
Writes a byte (8 bits) to a connection in Java format
parse.SmartComments
Parses one single smart comment
warnings.Verbose
Outputs any warnings recorded
more.Verbose
Creates a cloned instance with a lower threshold
swapXY.density
Swaps x and y coordinates of a density object
setTicks.ProgressBar
Sets values for which ticks should be visible
moveInSearchPath
Moves a environment in the search path to another position
setLabels.TextStatusBar
Sets new values of given labels
onSessionExit
Registers a function to be called when the R session finishes
readTableIndex
Reads a single column from file in table format
update.TextStatusBar
Updates the status bar (visually)
Java$writeInt
Writes a integer (32 bits) to a connection in Java format
Arguments$getCharacters
Coerces to a character vector and validates
System$getUsername
Retrieves the name of the user running R
hasOption.Options
Checks if an option exists
popMessage.TextStatusBar
Adds a message above the status bar
patchCode
Patches installed and loaded packages and more
printf.Verbose
Formats and prints object if above threshold
removeDirectory
Removes a directory
whichVector.logical
Identifies TRUE elements in a logical vector
queryRCmdCheck
Gets the on R CMD check if the current R session was launched by it
GString
Character string with advanced substitutions
TextStatusBar
A status bar at the R prompt that can be updated
cmdArgs
Simple access to parsed command-line arguments
getMessage.TimeoutException
Gets the message of the exception
Arguments$getIntegers
Coerces to a integer vector and validates
Arguments$getReadablePathname
Gets a readable pathname
Arguments$getIndices
Coerces to a integer vector and validates
popTemporaryFile
Drops a temporary suffix from the temporary pathname
isEof.connection
Checks if the current file position for a connection is at the 'End of File'
ruler.Verbose
Writes a ruler
setMaxValue.ProgressBar
Sets maximum value
seqToIntervals
Gets all contigous intervals of a vector of indices
Java$readInt
Reads a Java formatted int (32 bits) from a connection
wrap.array
Reshape an array or a matrix by permuting and/or joining dimensions
inAnyInterval.numeric
Checks if a set of values are inside one or more intervals
getLabel.TextStatusBar
Gets the current value of a label
Verbose
Class to writing verbose messages to a connection or file
draw.density
Draws a density curve
fileAccess
Checks the permission of a file or a directory
mkdirs
Creates a directory including any necessary but nonexistent parent directories
isZero
Checks if a value is (close to) zero or not
saveObject
Saves an object to a file or a connection
tempvar
Gets a unique non-existing temporary variable name
saveAnywhere.Settings
Saves settings to file
validate.SmartComments
Validates the compiled lines