Hotkey to jump to the beginning of the line.
Ctrl + a
Hotkey to delete all characters from the current cursor position to the end of the line.
Ctrl + k
Hotkey to delete a full line which I am currently editing.
Ctrl + u
What is the command to load data from a package?
data
Which of data structures can store more than a single data type?
list and data frame
Which of the following symbols are not valid variable names and why?
x .x X1 1X
x
.x
X1
1X
hello world helloworld
hello world
helloworld
i in f for
i
in
f
for
1X begins with a number
hello world contains a space
space
in and for reserved for functions
Which operators are asignment operators?
= <- -> <<-
=
<-
->
<<-
Which of the following operators are logical operators so return either TRUE or FALSE?
= ==
==
<= <-
<=
%in% %*%
%in%
%*%
+ -
+
-
== <= %in%
What terms are the conditionals?
if else else if
if
else
else if
What terms are loop expressions?
break for while next repeat
break
while
next
repeat
Command to declare a function
function
What is the prefered order of arguments in the function declaration?
mandatory, optional, delegation
To use the value of a function outside of that function what would you use at the end of your function?
return
The dim for a data frame returns?
first rows then columns
To display the data from a data frame `df` for the column `col` in a sorted manner, what is the right statement to do so?
df[order(df$col),]
To summarize a column of a vector by one ore more categories we use?
aggregate
What is the command to combine two data frames by a column which have the same set of values?
merge
What is the command you would use as the first command on the command line to get the sum of all row values for a matrix?
apply
To display tables with more than 2 dimensions we use:
ftable
To write a single data frame to the file system in a compressed compact file we use ...
save saveRDS
save
saveRDS
Last changed2 months ago