R language is an integrated suite for software facilities for data manipulation, calculation and graphical display.It can effectively handle data and also provide effective storage facility.R is very much a vehicle for newly developing methods of interactive data analysis. It has developed rapidly and has beeb extended by a large collection of packages.R can be regarded as an implementation of S language which was developed at Bell Laboratories by Ruck Becker, John Chambers and ALlen Wilks and also forms the basis of the S-PLUS systems.
Many classical statistics and latest methodologies are available in R, bbut user always needs to prepare to do a little work to find it.As compared to other Statistical languages, R will give minimal output and store the results in a fit object for subsequent interrogation by further R functions.
Create a sub-directory, say work by running the following few commads in terminal
> mkdir work
make this directory a working directory
> cd work
Start the R program with the command
> R
To quit the R program, use
> q()
For getting help simply wirte help() in R console.
> help()
For getting help about a specific topic write help(topic_name)
> help(solve)
For getting help about features specified by special characters
> help("[[")
For getting help in HTML format write
> help.start()
> source(filename.r)
> sink("record.lis") # will store the output from console to external file
> sink() # will restores the console once again.
Entities that are created in R are known as objects.These may be variables, arrays of numbers, character stings, functions or more general structure built from such components.During a R session, objects are created and stored by names and the R command
> objects()
# to display the name of the objects use
> ls()
The collection of objects currently stored is called a workspace.
> rm(object_name)
For installing packages
> install.packages("package_name")
For updating a particular package
update.packages("package_name")
Getting list of previously installed packages
> old.packages()
Unload package
> detach("packagename")
Uninstall a package
> remove.packages("packagename")
Check R Language Version
> version()
Check working Directory for storing R files
> getwd()
Checking Available Directories in Working directory
> dir()
Checking of available code files in R workspace
> ls()