1.8 Example-1 Hello R!

message("Hello R!")  #use to display messages
print("Hello R!")  #use to display variables/messages
[1] "Hello R!"
msg = "Hello R!"  #type inference no need to define strings!
print(msg)
[1] "Hello R!"
  • R packages not just come with demo programs but the help files for the functions in R packages mostly have example codes for the particular function. R function example() is helpful in running the example code for a function. For running example code for in quantreg package type example(rq, package=”quantreg”)