1
R PROGRAMMING EXAM NEWEST VERSION -2025/2026- 100+
QUESTIONS AND VERIFIED ANSWERS 100% CORRECT
GUARANTEED SUCCESS
Delete a directory
Delete a directory named "testdir2"
unlink("testdir2", recursive = TRUE)
Assign the value of the current working directory to a variable called "old.dir"
old.dir <- dir()
Create a sequence of numbers from 1 through 20
1:20 or seq(1,20)
This will create 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Create a sequence of numbers from pi to 10
print()
Explicit printing of what you put in the parentheses. You can also auto print
something by typing it and pressing enter. Note that R will print brackets around
the number of elements in a vector before the elements themselves.
ls()
List all of the objects in the local workspace
list.files()
List all files in the working directory
?
, 2
Use this to prompt the help page (e.g., ?list.files will bring up the help page for the
list.files function). Note that symbols must be enclosed in backticks after the ?
(e.g., ?`:`).
args()
Displays the argument names and corresponding default values of a function or
primitive
dir.create()
Create a directory in the current working directory
file.create()
Create a new file in the working directory
file.exists()
Check to see if a file exists in the working directory
file.info()
Get information about the file
file.rename()
Change the name of a file
file.remove()
Delete a file
file.copy()
Make a copy of a file
file.path()
Create a file path
Create a directory in the current working directory called "testdir2" and a
subdirectory for it called "testdir3" all in one command
R PROGRAMMING EXAM NEWEST VERSION -2025/2026- 100+
QUESTIONS AND VERIFIED ANSWERS 100% CORRECT
GUARANTEED SUCCESS
Delete a directory
Delete a directory named "testdir2"
unlink("testdir2", recursive = TRUE)
Assign the value of the current working directory to a variable called "old.dir"
old.dir <- dir()
Create a sequence of numbers from 1 through 20
1:20 or seq(1,20)
This will create 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Create a sequence of numbers from pi to 10
print()
Explicit printing of what you put in the parentheses. You can also auto print
something by typing it and pressing enter. Note that R will print brackets around
the number of elements in a vector before the elements themselves.
ls()
List all of the objects in the local workspace
list.files()
List all files in the working directory
?
, 2
Use this to prompt the help page (e.g., ?list.files will bring up the help page for the
list.files function). Note that symbols must be enclosed in backticks after the ?
(e.g., ?`:`).
args()
Displays the argument names and corresponding default values of a function or
primitive
dir.create()
Create a directory in the current working directory
file.create()
Create a new file in the working directory
file.exists()
Check to see if a file exists in the working directory
file.info()
Get information about the file
file.rename()
Change the name of a file
file.remove()
Delete a file
file.copy()
Make a copy of a file
file.path()
Create a file path
Create a directory in the current working directory called "testdir2" and a
subdirectory for it called "testdir3" all in one command