Rename R File: How to rename a file in R

R Programming
Table of Contents

Rename R file using R Programming command

What is it:

R is a free software programming language used in the field of statistical computing and graphics. This program is mainly used by Statisticians and Data Analysts.Rename R FilePin

In this R Programming tutorial/post we are discussing how to rename an R data using R command.


Though Operating systems will have simpler way of doing this however when you are working in the programming environment having the ability to use the commands for creating or manipulating the files is always useful.

How to rename R file:

Step 1: If you do not know your active directory check the same using the below command.


Step 2: Check if the file you want to rename exists in the directory


Step 3: If the file exists then use the below command to rename it.

file.rename(“myfileName.R” , “myfileRename.R“)

**replace the “myFileName” and “myfileRename” with your actual file names.

Note: Make sure you are using the commands after the ‘>’ symbol.

Picture of Anson Antony
Anson Antony
Anson is a contributing author and founder at Learning anything new has always been his passion, is an outcome of his passion for technology and business. He has got a decade of versatile experience in Business Process Outsourcing, Finance & Accounting, Information Technology, Operational Excellence & Business Intelligence. During the tenure, he had worked for organizations like Genpact, Hewlett Packard, M*Modal and Capgemini in various roles and responsibilities. Outside business and technology, he is a movie buff who spends hours together watching and learning Cinema and a Film Maker too!

Leave a Reply

Your email address will not be published. Required fields are marked *

You Made It,
Don't Close!

Get Up To 60,000 UberTTS Character Credits for Free!!!

This popup won’t show up to you again!!!

Share to...