Basic list of R commands

Today , I will give a brief introduction about basic commands used in R programming –

Memory Allocation – 

ls() – lists the objects that are currently in R’s memory

rm() – removes the names of the objects present in R’s memory, however, doesnt erase the objects

R_commands

 

memory.size() – tells the current memory allocated to R

gc() – erases the objects and hence, reduces the memory allocation

System Date and Time –

Sys.time() – gives the current time according to the CPU. Keep in mind that R commands are case sensitive.

Sys.Date() – gives the current Date according to the CPU

R_commands

Working Directory

getwd()

setwd()

dir()

Installing and Loading Packages –

install.packages(“Rcmdr”) – installs the package Rcmdr, notice the quotation marks

library(Rcmdr) – loads package Rcmdr or makes Rcmdr available for use(no quotation marks)

R_commands

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s