## ----Q2, echo=SOLUTIONS-------------------------------------------------------
# PU5058 Introduction to Health Data Science, Exercise 1
# Date: 21/09/26
# Created by: Professor Plum


## ----Q4, echo=SOLUTIONS-------------------------------------------------------
help(mean)          # different methods of using help
?mean
help("mean")


## ----Q5, echo=SOLUTIONS-------------------------------------------------------
plot(1:10)    # dont worry about what 1:10 does just yet


## ----Q6, echo=SOLUTIONS-------------------------------------------------------
first_num <- 42    # create variable first_num and assign the value 42
first_char <- "my first character"


## ----Q7, echo=SOLUTIONS-------------------------------------------------------
rm(first_num)
ls()          # list all variables in the workspace 


## ----Q8, echo=SOLUTIONS-------------------------------------------------------
first_char <- "my second character"
first_char    # display the value 


## ----Q9, echo=SOLUTIONS-------------------------------------------------------
apropos("plot")
help('plot.design')


## ----Q10, echo=SOLUTIONS------------------------------------------------------
help.search("plot")
??plot     # shortcut for help.search function

help.search("plot", package = "nlme")


## ----Q11, echo=SOLUTIONS------------------------------------------------------
getwd()    # displays the current working directory 


## ----Q12, echo=SOLUTIONS------------------------------------------------------
list.files(include.dirs = TRUE)

