Search This Blog

7.5.20

Common R commands to learn on early days

If you are just starting with R then here is the list of some commands which you must master. 

These commands will immensely help you in this journey. Here they are:


getwd() - This is the first command that you must learn. This will show you where is all your work going to be saved or a folder on your computer's disk from where you are working. you can execute this command on R console and to know the current directory it doesn't take any arguments.

setwd() - If the result of the getwd() function is a folder where you don't want all work to be saved at then using setwd() you can set your working directory to your preferred location on your computer.

dir() - list all files available in the current working directory. This a good command and helpful to find out what files are available without going out from R console or studio. 

source() - source is the function that help load the code from the .R file where you may have saved your custom code.

No comments:

Post a Comment