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