excel right() function in R

as part of the excel functions in R, I have developed this custom function, reproducing the excel right() function in th R language. Feel free to copy and use it.

right = function (string, char){
substr(string,nchar(string)-(char-1),nchar(string))}

you can find other function in the Excel functions in R post.

Advertisements

One thought on “excel right() function in R

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