Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
R Object-oriented Programming

You're reading from   R Object-oriented Programming A practical guide to help you learn and understand the programming techniques necessary to exploit the full power of R

Arrow left icon
Product type Paperback
Published in Oct 2014
Publisher
ISBN-13 9781783986682
Length 190 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
 Black Black
Author Profile Icon Black
Black
Arrow right icon
View More author details
Toc

Chapter 7. Basic Programming

In the previous chapters, we explored the basic aspects of how R stores information and the different ways to organize information. We will now explore the way that operations can be defined and executed, and write a program in R. The ability to create algorithms that combine functions to complete complicated tasks is one of R's best features. We continue the exploration of programming in the next two chapters and focus on object-oriented approaches. This chapter is divided into four parts:

  • Conditional execution: In this section, we will introduce if-then-else blocks and discuss logical operators
  • Loop constructs: In this section, we will explore three different ways to implement loops
  • Functions: In this section, we will discuss how to define functions in R and explore some of the important considerations associated with functions
  • Script execution: In this section, we will discuss how to execute a set of commands that have been saved in a file
lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
R Object-oriented Programming
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime
Modal Close icon
Modal Close icon