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