List/Grid

Tag Archives: splus

Get current date in Splus/R

Get current date in Splus/R

Today i will discuss, how to get current date in splus/r and format it to your needs. To get current date do: > today < - Sys.Date() //Display current date... Read more »

Select non consecutive rows from data frame – R

Select non consecutive rows from data frame – R

We can easily select consecutive rows from a data frame using dataframe[n1:n2,], where n1 and n2 are the starting and end rows, however it is bit tricky to select non… Read more »

Create empty data frame with column names – R

Create empty data frame with column names – R

It is easy to create a empty data frame, but some how tricky to create a empty data frame with columns defined. To create a simple empty data frame you… Read more »

Passing parameters to a R file (.r file)

Passing parameters to a R file (.r file)

While dealing with a R script, i came across a issue where i needed to send parameters to a R script and use inside my script. With perl its very… Read more »

Rearrange columns of a data frame – R

Here i will explain how can we rearrange the columns of a data frame and also how can we rename columns. I will use the data frame that i used… Read more »

Add columns in a data frame – R

If you have a data frame and you wish to add a column then here is how you should do it: Lets say your data frame is > data date_… Read more »

Delete rows from a data frame with NA’s

Here is how to delete all the rows from a dataframe where any of the column value had the value NA. For Example, this is my data frame: > data… Read more »

Delete a column from a data frame in R

Here is a quick tip to delete a column from a data frame in R: Lets assume our data frame is: > data code sector industry 1 901 Basic Industries… Read more »

Tips to use data frame in R

Here are some tips to manipulate data frame in R: Lets say the data frame that we have is: > data code sector industry 1 901 Basic Industries Building and… Read more »

Connect to Oracle in R (Linux)

First thing first, you need to start the listener for the database you need to connect to in R. There are two ways to connect to Oracle: Using ROracle or… Read more »