Understanding R basics

So how R works.

I hope by this time you have installed R. I am running R under windows vista ultimate. So many things I here will refer to windows operating environment.

R Interface


When you start R, it shows you the version and licence information in editor window.

R is a command line software. so, every line starts with >

> y<-rnorm(50)

When a statement is incomplete it gives + sign

> xy<-read.table("control_vs_inocul.txt", 

+ header=T,

+ na.string=".")

is same as

> xy<-read.table("control_vs_inocul.txt", header=T, na.string=".")

R is case sensitive

> Var<-20

> VAR<-30

> var<-40

here Var, VAR and var correspond to different variables.


# this is a comment

Till now, I have not found multiple commenting system.

Changing Root directory

Go to File>Change Dir..

Installing and Loading packages

Go to Packages>Install Package(s).

Go to Packages>Install Package  or

> library (packagename)

Getting help

> help.start() # to get general help, opens in web browser

> help(fun) # help on specific function

> ?fun # same as help(fun)

> help.search("comment") # searches for items containg "comment"

> RSiteSearch("comment") # searches in R site for term comment

It's all for now...........