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