As this is the first set exercises in this course, it is quite easy
and short. Its purpose is also to get used to this exercise format and,
more importantly, to get a first feeling for working with R
and RStudio.
Note: You can find the solutions for this exercise as well
as all other exercises in the solutions
folder in the
repo/directory that contains the course materials. You can easily copy
code from these solution files by clicking on the small blue clipboard
icon in the upper right corner of the solution boxes showing the
code.
For the following simple coding tasks in this first set of exercises,
you can just work interactively in the Console in
R
/RStudio.
Feel free to play around a bit and try a few things out.
R
. Assign the number 42 to
an object named the_answer
and then print the object to the
console.
<-
for this.
Also have a look at the Environment
tab in the
RStudio interface. The object you created should now be visible
there.
base
package to calculate
the square root of 49.
grep()
function. How many
required arguments does it have?