Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Bayesian Models with R

You're reading from  Learning Bayesian Models with R

Product type Book
Published in Oct 2015
Publisher Packt
ISBN-13 9781783987603
Pages 168 pages
Edition 1st Edition
Languages
Author (1):
Hari Manassery Koduvely Hari Manassery Koduvely
Profile icon Hari Manassery Koduvely

Table of Contents (16) Chapters

Learning Bayesian Models with R
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Introducing the Probability Theory 2. The R Environment 3. Introducing Bayesian Inference 4. Machine Learning Using Bayesian Inference 5. Bayesian Regression Models 6. Bayesian Classification Models 7. Bayesian Models for Unsupervised Learning 8. Bayesian Neural Networks 9. Bayesian Modeling at Big Data Scale Index

Writing R programs


Although much data analysis in R can be carried out in an interactive manner using command prompt, often for more complex tasks, one needs to write R scripts. As mentioned in the introduction, R has both the perspective of a functional and object-oriented programming language. In this section, some of the standard syntaxes of the programming in R are described.

Control structures

Control structures are meant for controlling the flow of execution of a program. The standard control structures are as follows:

  • if and else: To test a condition

  • for: To loop over a set of statements for a fixed number of times

  • while: To loop over a set of statements while a condition is true

  • repeat: To execute an infinite loop

  • break: To break the execution of a loop

  • next: To skip an iteration of a loop

  • return: To exit a function

Functions

If one wants to use R for more serious programming, it is essential to know how to write functions. They make the language more powerful and elegant. R has many...

lock icon The rest of the chapter is locked
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 €14.99/month. Cancel anytime}