•Scripts can be written/edited in the R editor window and console commands can be directly
executed in the R console window as shown in Figure 8.2.
8.1.3Introduction to Basic R Commands
Try each of the following commands from the command prompt in R console (or from RStudio,
if you want).
Sr #CommandPurposeSample Code with Output
1.
getwd ()
Getting the current working
directory.
>getwd()
[1] “C:/ “
2.
setwd ()
Setting the current working
directory.
>setwd(“C:/R Programs”)
3.
dir()
See directory content
>dir()
[1] “Example.doc”
“HelloWorld.R “
M08 Big Data Simplified ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.