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