Topic: Utilities

Topic Description:

Basic R utilities used in many packages and functions, such as date and string manipulations, statistical distributions, geometry of lines and distances. The R package date is required for the two data functions.



File: utilities/utilities.r

View File Source Download File No help file available

Function: TextToRdata

Function Description: TextToRdata

Reads a tab-delimited text file and save as rdata.

Function Arguments:

ArgumentDefault Value
infile
outfile
object
NAs'NA'

Function Source:

TextToRdata=function(infile,outfile,object,NAs='NA')
{
assign(object,read.delim(infile,as.is=TRUE,na.strings=NAs))
if(dim(get(object))[1]>0) save(list=object,file=outfile)
else cat('No lines in ', infile, '\n')
}