KEMBAR78
Introduction to R programming | PPTX
Introduction to R Programming
Capacity building course for
Web Monitoring Group
Developed by
Victor Ordu
Prerequisites
a. Be able to see at a computer screen
b. Be able to hit the keys of a computer
keyboard
c. Be willing and eager to learn
d. Be adventurous and courageous
• R is a programming language
• developed in the 1980s for the purpose of
running statistical analyses
• has become a widely used tool by data
scientists and is growing in popularity.
Advantages
R is great because:
a. It is free
b. easy to download and install
c. has a vibrant global community
d. produces publication grade graphics
e. easy to learn
f. highly extensible (ask what this means!)
g. ensures reproducibility of results
h. encourages transparency in methodology
Disadvantages
R, like everything in life, has its own issues:
a. It has a steep learning curve i.e. difficult to
master
Solution: Practice, practice, practice!
b. It is a quirky language as it is not that
intuitive [e.g. in English – read (present
tense) and read (past tense)]
Solution: More practice!
R Console
• Operations in R are through a command line
interface (CLI)
• Different from point-and-click software
R-console
Prompt: You pass your instructions to the program here!
• When you type your code at the prompt you
hit ENTER key to run the code
• R reads code from left to right and from top to
bottom
Exercise
• Type in the following code and hit ENTER:
• NOTE: The prompt “>” only shows you where
to type.
• Now type ‘x’ again and hit ENTER
• Congrats, you have created an R object called
x containing data ranging from 1 to 10!
Conclusion
Welcome to the world of R!
Next topic will be on R Objects…

Introduction to R programming

  • 1.
    Introduction to RProgramming Capacity building course for Web Monitoring Group Developed by Victor Ordu
  • 2.
    Prerequisites a. Be ableto see at a computer screen b. Be able to hit the keys of a computer keyboard c. Be willing and eager to learn d. Be adventurous and courageous
  • 3.
    • R isa programming language • developed in the 1980s for the purpose of running statistical analyses • has become a widely used tool by data scientists and is growing in popularity.
  • 4.
    Advantages R is greatbecause: a. It is free b. easy to download and install c. has a vibrant global community d. produces publication grade graphics e. easy to learn f. highly extensible (ask what this means!) g. ensures reproducibility of results h. encourages transparency in methodology
  • 5.
    Disadvantages R, like everythingin life, has its own issues: a. It has a steep learning curve i.e. difficult to master Solution: Practice, practice, practice! b. It is a quirky language as it is not that intuitive [e.g. in English – read (present tense) and read (past tense)] Solution: More practice!
  • 6.
    R Console • Operationsin R are through a command line interface (CLI) • Different from point-and-click software
  • 7.
    R-console Prompt: You passyour instructions to the program here!
  • 8.
    • When youtype your code at the prompt you hit ENTER key to run the code • R reads code from left to right and from top to bottom
  • 9.
    Exercise • Type inthe following code and hit ENTER: • NOTE: The prompt “>” only shows you where to type. • Now type ‘x’ again and hit ENTER • Congrats, you have created an R object called x containing data ranging from 1 to 10!
  • 10.
    Conclusion Welcome to theworld of R! Next topic will be on R Objects…