INTRODUCTION TO PROSTHODONTICS INTRODUCTION TO PROSTHODONTICS.
Introduction to computing_using_r
-
Upload
parthasarathi-e -
Category
Engineering
-
view
77 -
download
0
description
Transcript of Introduction to computing_using_r
![Page 1: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/1.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Introduction to Computing Using R
Parthasarathi Edupally
CRISIL, Risk & Analytics
Advanced Bootcamp, 2014
Parthasarathi Edupally Introduction to Computing Using R
![Page 2: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/2.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Outline
1 Motivation and ObjectiveWhat is this module about ?Why learn R ?
2 FundamentalsLanguage FoundationsFunctionsDataVocabulary
3 Further Reading and ReferencesAdvanced TopicsReferences
4 Thank You
Parthasarathi Edupally Introduction to Computing Using R
![Page 3: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/3.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Outline
1 Motivation and ObjectiveWhat is this module about ?Why learn R ?
2 FundamentalsLanguage FoundationsFunctionsDataVocabulary
3 Further Reading and ReferencesAdvanced TopicsReferences
4 Thank You
Parthasarathi Edupally Introduction to Computing Using R
![Page 4: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/4.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Outline
1 Motivation and ObjectiveWhat is this module about ?Why learn R ?
2 FundamentalsLanguage FoundationsFunctionsDataVocabulary
3 Further Reading and ReferencesAdvanced TopicsReferences
4 Thank You
Parthasarathi Edupally Introduction to Computing Using R
![Page 5: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/5.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Outline
1 Motivation and ObjectiveWhat is this module about ?Why learn R ?
2 FundamentalsLanguage FoundationsFunctionsDataVocabulary
3 Further Reading and ReferencesAdvanced TopicsReferences
4 Thank You
Parthasarathi Edupally Introduction to Computing Using R
![Page 6: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/6.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
What is this module about ?Why learn R ?
What is this module about ?
Learn to use computational resources to solve problemsAn introduction to R statistical softwareDeep understanding of language fundamentals than lot oflanguage specific detailsA good starting point to learn scientific computing inquantitative researchNo cookbook approach to teach a programming languageJust a concise overview, have to go through resourcesmentioned for thorough understanding.
Parthasarathi Edupally Introduction to Computing Using R
![Page 7: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/7.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
What is this module about ?Why learn R ?
What is this module about ?
Learn to use computational resources to solve problems
An introduction to R statistical softwareDeep understanding of language fundamentals than lot oflanguage specific detailsA good starting point to learn scientific computing inquantitative researchNo cookbook approach to teach a programming languageJust a concise overview, have to go through resourcesmentioned for thorough understanding.
Parthasarathi Edupally Introduction to Computing Using R
![Page 8: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/8.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
What is this module about ?Why learn R ?
What is this module about ?
Learn to use computational resources to solve problemsAn introduction to R statistical softwareDeep understanding of language fundamentals than lot oflanguage specific details
A good starting point to learn scientific computing inquantitative researchNo cookbook approach to teach a programming languageJust a concise overview, have to go through resourcesmentioned for thorough understanding.
Parthasarathi Edupally Introduction to Computing Using R
![Page 9: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/9.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
What is this module about ?Why learn R ?
What is this module about ?
Learn to use computational resources to solve problemsAn introduction to R statistical softwareDeep understanding of language fundamentals than lot oflanguage specific detailsA good starting point to learn scientific computing inquantitative research
No cookbook approach to teach a programming languageJust a concise overview, have to go through resourcesmentioned for thorough understanding.
Parthasarathi Edupally Introduction to Computing Using R
![Page 10: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/10.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
What is this module about ?Why learn R ?
What is this module about ?
Learn to use computational resources to solve problemsAn introduction to R statistical softwareDeep understanding of language fundamentals than lot oflanguage specific detailsA good starting point to learn scientific computing inquantitative researchNo cookbook approach to teach a programming languageJust a concise overview, have to go through resourcesmentioned for thorough understanding.
Parthasarathi Edupally Introduction to Computing Using R
![Page 11: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/11.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
What is this module about ?Why learn R ?
Why learn R ?
This is why you should :Its open source, anyone can replicate your resultsA massive set of packages for statistical analysis, machinelearning etcSpecially designed for statistics and Data analysis withfeatures like missing values, Dataframes, subsetting etcStrong foundations in functional programmingDesinged to connect to low level languages for highperformance
Some drawbacks :Most of the code is written in haste to solve a pressingproblem at hand, so code is less elegant, less faster andless easier to understand.It is not particularly fast programming language.
Parthasarathi Edupally Introduction to Computing Using R
![Page 12: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/12.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
What is this module about ?Why learn R ?
Why learn R ?
This is why you should :Its open source, anyone can replicate your resultsA massive set of packages for statistical analysis, machinelearning etcSpecially designed for statistics and Data analysis withfeatures like missing values, Dataframes, subsetting etc
Strong foundations in functional programmingDesinged to connect to low level languages for highperformance
Some drawbacks :Most of the code is written in haste to solve a pressingproblem at hand, so code is less elegant, less faster andless easier to understand.It is not particularly fast programming language.
Parthasarathi Edupally Introduction to Computing Using R
![Page 13: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/13.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
What is this module about ?Why learn R ?
Why learn R ?
This is why you should :Its open source, anyone can replicate your resultsA massive set of packages for statistical analysis, machinelearning etcSpecially designed for statistics and Data analysis withfeatures like missing values, Dataframes, subsetting etcStrong foundations in functional programmingDesinged to connect to low level languages for highperformance
Some drawbacks :Most of the code is written in haste to solve a pressingproblem at hand, so code is less elegant, less faster andless easier to understand.It is not particularly fast programming language.
Parthasarathi Edupally Introduction to Computing Using R
![Page 14: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/14.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
What is this module about ?Why learn R ?
Why learn R ?
This is why you should :Its open source, anyone can replicate your resultsA massive set of packages for statistical analysis, machinelearning etcSpecially designed for statistics and Data analysis withfeatures like missing values, Dataframes, subsetting etcStrong foundations in functional programmingDesinged to connect to low level languages for highperformance
Some drawbacks :
Most of the code is written in haste to solve a pressingproblem at hand, so code is less elegant, less faster andless easier to understand.It is not particularly fast programming language.
Parthasarathi Edupally Introduction to Computing Using R
![Page 15: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/15.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
What is this module about ?Why learn R ?
Why learn R ?
This is why you should :Its open source, anyone can replicate your resultsA massive set of packages for statistical analysis, machinelearning etcSpecially designed for statistics and Data analysis withfeatures like missing values, Dataframes, subsetting etcStrong foundations in functional programmingDesinged to connect to low level languages for highperformance
Some drawbacks :Most of the code is written in haste to solve a pressingproblem at hand, so code is less elegant, less faster andless easier to understand.It is not particularly fast programming language.
Parthasarathi Edupally Introduction to Computing Using R
![Page 16: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/16.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Expressions
Most often when we write code we are writing anexpressionExpression describes a computation and evaluates to avalueIn Math - addition, division etcAll expressions can be represented by a function notation -It is the most general representationTypes of expressions :
primitive expression – Numbers, Names, Stringscall expressions – operator(op1, op2)
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 17: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/17.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Expressions
Most often when we write code we are writing anexpressionExpression describes a computation and evaluates to avalue
In Math - addition, division etcAll expressions can be represented by a function notation -It is the most general representationTypes of expressions :
primitive expression – Numbers, Names, Stringscall expressions – operator(op1, op2)
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 18: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/18.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Expressions
Most often when we write code we are writing anexpressionExpression describes a computation and evaluates to avalueIn Math - addition, division etcAll expressions can be represented by a function notation -It is the most general representation
Types of expressions :primitive expression – Numbers, Names, Stringscall expressions – operator(op1, op2)
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 19: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/19.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Expressions
Most often when we write code we are writing anexpressionExpression describes a computation and evaluates to avalueIn Math - addition, division etcAll expressions can be represented by a function notation -It is the most general representationTypes of expressions :
primitive expression – Numbers, Names, Stringscall expressions – operator(op1, op2)
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 20: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/20.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Expressions
Most often when we write code we are writing anexpressionExpression describes a computation and evaluates to avalueIn Math - addition, division etcAll expressions can be represented by a function notation -It is the most general representationTypes of expressions :
primitive expression – Numbers, Names, Stringscall expressions – operator(op1, op2)
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 21: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/21.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Abstraction using Names and User-defined functions
When we write code we are building complex system forcomputationAbstraction is an important idea in designing complexsystemsNaming - Simplest means of abstraction, bind names tovaluesUser-defined function :more powerful means ofabstraction, binds names to expressions
Parthasarathi Edupally Introduction to Computing Using R
![Page 22: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/22.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Abstraction using Names and User-defined functions
When we write code we are building complex system forcomputation
Abstraction is an important idea in designing complexsystemsNaming - Simplest means of abstraction, bind names tovaluesUser-defined function :more powerful means ofabstraction, binds names to expressions
Parthasarathi Edupally Introduction to Computing Using R
![Page 23: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/23.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Abstraction using Names and User-defined functions
When we write code we are building complex system forcomputationAbstraction is an important idea in designing complexsystems
Naming - Simplest means of abstraction, bind names tovaluesUser-defined function :more powerful means ofabstraction, binds names to expressions
Parthasarathi Edupally Introduction to Computing Using R
![Page 24: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/24.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Abstraction using Names and User-defined functions
When we write code we are building complex system forcomputationAbstraction is an important idea in designing complexsystemsNaming - Simplest means of abstraction, bind names tovalues
User-defined function :more powerful means ofabstraction, binds names to expressions
Parthasarathi Edupally Introduction to Computing Using R
![Page 25: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/25.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Abstraction using Names and User-defined functions
When we write code we are building complex system forcomputationAbstraction is an important idea in designing complexsystemsNaming - Simplest means of abstraction, bind names tovaluesUser-defined function :more powerful means ofabstraction, binds names to expressions
Parthasarathi Edupally Introduction to Computing Using R
![Page 26: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/26.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Statements
They are used to perform an action, they don’t evaluateto valueThere can be conditional and iterative statementsConditional statements:
if-elseif-elseIterative statements:
for() {}while() {}
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 27: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/27.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Statements
They are used to perform an action, they don’t evaluateto value
There can be conditional and iterative statementsConditional statements:
if-elseif-elseIterative statements:
for() {}while() {}
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 28: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/28.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Statements
They are used to perform an action, they don’t evaluateto valueThere can be conditional and iterative statements
Conditional statements:if-elseif-else
Iterative statements:for() {}while() {}
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 29: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/29.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Statements
They are used to perform an action, they don’t evaluateto valueThere can be conditional and iterative statementsConditional statements:
if-elseif-else
Iterative statements:for() {}while() {}
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 30: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/30.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Statements
They are used to perform an action, they don’t evaluateto valueThere can be conditional and iterative statementsConditional statements:
if-elseif-elseIterative statements:
for() {}while() {}
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 31: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/31.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Statements
They are used to perform an action, they don’t evaluateto valueThere can be conditional and iterative statementsConditional statements:
if-elseif-elseIterative statements:
for() {}while() {}
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 32: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/32.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Environments
They are used by the interpreter to understand the scopingrulesJob of an environment is to bind set of names to set ofvalues (a bag of names)Each name points to an object stored elsewhere inmemoryEvery environment has a parent, anotherenvironment(except for empty environment)
Parthasarathi Edupally Introduction to Computing Using R
![Page 33: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/33.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Environments
They are used by the interpreter to understand the scopingrules
Job of an environment is to bind set of names to set ofvalues (a bag of names)Each name points to an object stored elsewhere inmemoryEvery environment has a parent, anotherenvironment(except for empty environment)
Parthasarathi Edupally Introduction to Computing Using R
![Page 34: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/34.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Environments
They are used by the interpreter to understand the scopingrulesJob of an environment is to bind set of names to set ofvalues (a bag of names)Each name points to an object stored elsewhere inmemory
Every environment has a parent, anotherenvironment(except for empty environment)
Parthasarathi Edupally Introduction to Computing Using R
![Page 35: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/35.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Environments
They are used by the interpreter to understand the scopingrulesJob of an environment is to bind set of names to set ofvalues (a bag of names)Each name points to an object stored elsewhere inmemoryEvery environment has a parent, anotherenvironment(except for empty environment)
Parthasarathi Edupally Introduction to Computing Using R
![Page 36: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/36.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Environments
Four Special environments:globalenv() - is the interactive workspace, environment inwhich we normally workbaseenv() - is the environment of the base packageemptyenv() - is the ultimate ancestor of all environmentsenvironment() - is the current environment
Search paths guide the interpreter to look for the values ofnames
Parthasarathi Edupally Introduction to Computing Using R
![Page 37: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/37.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Environments
Four Special environments:globalenv() - is the interactive workspace, environment inwhich we normally workbaseenv() - is the environment of the base packageemptyenv() - is the ultimate ancestor of all environmentsenvironment() - is the current environment
Search paths guide the interpreter to look for the values ofnames
Parthasarathi Edupally Introduction to Computing Using R
![Page 38: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/38.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
User-defined functions
Life cycle of user-defined function :Function definition - name bound to that function in currentenvironment (enclosing environment)Function call- A new environment(calling environment) iscreated and call expression is executedPlease note there is execution environment, environment inwhich function was called.
R uses Lexical Scoping - Looks for name bindings inenclosing environment not in the execution environment.The enclosing environment determines how the functionfinds values; the binding environments determine how wefind the function.
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 39: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/39.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
User-defined functions
Life cycle of user-defined function :Function definition - name bound to that function in currentenvironment (enclosing environment)Function call- A new environment(calling environment) iscreated and call expression is executed
Please note there is execution environment, environment inwhich function was called.
R uses Lexical Scoping - Looks for name bindings inenclosing environment not in the execution environment.The enclosing environment determines how the functionfinds values; the binding environments determine how wefind the function.
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 40: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/40.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
User-defined functions
Life cycle of user-defined function :Function definition - name bound to that function in currentenvironment (enclosing environment)Function call- A new environment(calling environment) iscreated and call expression is executedPlease note there is execution environment, environment inwhich function was called.
R uses Lexical Scoping - Looks for name bindings inenclosing environment not in the execution environment.The enclosing environment determines how the functionfinds values; the binding environments determine how wefind the function.
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 41: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/41.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
User-defined functions
Life cycle of user-defined function :Function definition - name bound to that function in currentenvironment (enclosing environment)Function call- A new environment(calling environment) iscreated and call expression is executedPlease note there is execution environment, environment inwhich function was called.
R uses Lexical Scoping - Looks for name bindings inenclosing environment not in the execution environment.
The enclosing environment determines how the functionfinds values; the binding environments determine how wefind the function.
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 42: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/42.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
User-defined functions
Life cycle of user-defined function :Function definition - name bound to that function in currentenvironment (enclosing environment)Function call- A new environment(calling environment) iscreated and call expression is executedPlease note there is execution environment, environment inwhich function was called.
R uses Lexical Scoping - Looks for name bindings inenclosing environment not in the execution environment.The enclosing environment determines how the functionfinds values; the binding environments determine how wefind the function.
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 43: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/43.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
User-defined functions
Life cycle of user-defined function :Function definition - name bound to that function in currentenvironment (enclosing environment)Function call- A new environment(calling environment) iscreated and call expression is executedPlease note there is execution environment, environment inwhich function was called.
R uses Lexical Scoping - Looks for name bindings inenclosing environment not in the execution environment.The enclosing environment determines how the functionfinds values; the binding environments determine how wefind the function.
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 44: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/44.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Every value in R has a type associated with it
Native data types :Have primitive expressions that evaluate to values of thesetypesBuilt-in functions, operators, methods to manipulate thosevalues
There are also abstract data types (Data structures), whichwere defined along with there functions, methods, operators tomake R more useful for statistical analysis
Parthasarathi Edupally Introduction to Computing Using R
![Page 45: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/45.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Every value in R has a type associated with it
Native data types :
Have primitive expressions that evaluate to values of thesetypes
Built-in functions, operators, methods to manipulate thosevalues
There are also abstract data types (Data structures), whichwere defined along with there functions, methods, operators tomake R more useful for statistical analysis
Parthasarathi Edupally Introduction to Computing Using R
![Page 46: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/46.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Every value in R has a type associated with it
Native data types :
Have primitive expressions that evaluate to values of thesetypes
Built-in functions, operators, methods to manipulate thosevalues
There are also abstract data types (Data structures), whichwere defined along with there functions, methods, operators tomake R more useful for statistical analysis
Parthasarathi Edupally Introduction to Computing Using R
![Page 47: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/47.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Every value in R has a type associated with it
Native data types :
Have primitive expressions that evaluate to values of thesetypes
Built-in functions, operators, methods to manipulate thosevalues
There are also abstract data types (Data structures), whichwere defined along with there functions, methods, operators tomake R more useful for statistical analysis
Parthasarathi Edupally Introduction to Computing Using R
![Page 48: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/48.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Objects
Objects represent information - consist of data and behaviour
They can represent - things, properties, Interactions, processes
Type of an object is called class
Abstract data type(a class) is some collection ofmethods(functions) and behaviour condition defined on it.
Parthasarathi Edupally Introduction to Computing Using R
![Page 49: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/49.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Objects
Objects represent information - consist of data and behaviour
They can represent - things, properties, Interactions, processes
Type of an object is called class
Abstract data type(a class) is some collection ofmethods(functions) and behaviour condition defined on it.
Parthasarathi Edupally Introduction to Computing Using R
![Page 50: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/50.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Objects
Objects represent information - consist of data and behaviour
They can represent - things, properties, Interactions, processes
Type of an object is called class
Abstract data type(a class) is some collection ofmethods(functions) and behaviour condition defined on it.
Parthasarathi Edupally Introduction to Computing Using R
![Page 51: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/51.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Objects
Objects represent information - consist of data and behaviour
They can represent - things, properties, Interactions, processes
Type of an object is called class
Abstract data type(a class) is some collection ofmethods(functions) and behaviour condition defined on it.
Parthasarathi Edupally Introduction to Computing Using R
![Page 52: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/52.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Data structures
These are abstract data types defined in R and can beorganised according to their dimensionality and whether theyare homogeneous.
One dimensional structures - Atomic vectors, lists
Two dimensional structures - Matrices, Data frames
Multidimensional - Arrays
A data frame is the most common way of storing data in R, andmakes data analysis easier
All objects and thus data structures have attributes - to storemetadata about the object <Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 53: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/53.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Data structures
These are abstract data types defined in R and can beorganised according to their dimensionality and whether theyare homogeneous.
One dimensional structures - Atomic vectors, lists
Two dimensional structures - Matrices, Data frames
Multidimensional - Arrays
A data frame is the most common way of storing data in R, andmakes data analysis easier
All objects and thus data structures have attributes - to storemetadata about the object <Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 54: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/54.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Data structures
These are abstract data types defined in R and can beorganised according to their dimensionality and whether theyare homogeneous.
One dimensional structures - Atomic vectors, lists
Two dimensional structures - Matrices, Data frames
Multidimensional - Arrays
A data frame is the most common way of storing data in R, andmakes data analysis easier
All objects and thus data structures have attributes - to storemetadata about the object <Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 55: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/55.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Data structures
These are abstract data types defined in R and can beorganised according to their dimensionality and whether theyare homogeneous.
One dimensional structures - Atomic vectors, lists
Two dimensional structures - Matrices, Data frames
Multidimensional - Arrays
A data frame is the most common way of storing data in R, andmakes data analysis easier
All objects and thus data structures have attributes - to storemetadata about the object <Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 56: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/56.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Data structures
These are abstract data types defined in R and can beorganised according to their dimensionality and whether theyare homogeneous.
One dimensional structures - Atomic vectors, lists
Two dimensional structures - Matrices, Data frames
Multidimensional - Arrays
A data frame is the most common way of storing data in R, andmakes data analysis easier
All objects and thus data structures have attributes - to storemetadata about the object
<Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 57: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/57.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
Data structures
These are abstract data types defined in R and can beorganised according to their dimensionality and whether theyare homogeneous.
One dimensional structures - Atomic vectors, lists
Two dimensional structures - Matrices, Data frames
Multidimensional - Arrays
A data frame is the most common way of storing data in R, andmakes data analysis easier
All objects and thus data structures have attributes - to storemetadata about the object <Demo>
Parthasarathi Edupally Introduction to Computing Using R
![Page 58: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/58.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
<DEMO>
Parthasarathi Edupally Introduction to Computing Using R
![Page 59: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/59.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Language FoundationsFunctionsDataVocabulary
<DEMO>
Parthasarathi Edupally Introduction to Computing Using R
![Page 60: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/60.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Advanced TopicsReferences
Important Advanced Topics
Object systems in R
Subsetting
Functional programming paradigm
Memory usage in R
Using lower level languages for better performance where everrequired in R
Parthasarathi Edupally Introduction to Computing Using R
![Page 61: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/61.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Advanced TopicsReferences
Important Advanced Topics
Object systems in R
Subsetting
Functional programming paradigm
Memory usage in R
Using lower level languages for better performance where everrequired in R
Parthasarathi Edupally Introduction to Computing Using R
![Page 62: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/62.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Advanced TopicsReferences
Important Advanced Topics
Object systems in R
Subsetting
Functional programming paradigm
Memory usage in R
Using lower level languages for better performance where everrequired in R
Parthasarathi Edupally Introduction to Computing Using R
![Page 63: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/63.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Advanced TopicsReferences
Important Advanced Topics
Object systems in R
Subsetting
Functional programming paradigm
Memory usage in R
Using lower level languages for better performance where everrequired in R
Parthasarathi Edupally Introduction to Computing Using R
![Page 64: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/64.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Advanced TopicsReferences
Important Advanced Topics
Object systems in R
Subsetting
Functional programming paradigm
Memory usage in R
Using lower level languages for better performance where everrequired in R
Parthasarathi Edupally Introduction to Computing Using R
![Page 65: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/65.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Advanced TopicsReferences
Important Advanced Topics
Object systems in R
Subsetting
Functional programming paradigm
Memory usage in R
Using lower level languages for better performance where everrequired in R
Parthasarathi Edupally Introduction to Computing Using R
![Page 66: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/66.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Advanced TopicsReferences
Resources
Advanced R by Hadley Wickham
Structure and Interpretation of Computer Programs - Berkleywebcast(CS61A, Fall 2013)
R package documentation
Parthasarathi Edupally Introduction to Computing Using R
![Page 67: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/67.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Advanced TopicsReferences
Resources
Advanced R by Hadley Wickham
Structure and Interpretation of Computer Programs - Berkleywebcast(CS61A, Fall 2013)
R package documentation
Parthasarathi Edupally Introduction to Computing Using R
![Page 68: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/68.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Advanced TopicsReferences
Resources
Advanced R by Hadley Wickham
Structure and Interpretation of Computer Programs - Berkleywebcast(CS61A, Fall 2013)
R package documentation
Parthasarathi Edupally Introduction to Computing Using R
![Page 69: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/69.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Advanced TopicsReferences
Resources
Advanced R by Hadley Wickham
Structure and Interpretation of Computer Programs - Berkleywebcast(CS61A, Fall 2013)
R package documentation
Parthasarathi Edupally Introduction to Computing Using R
![Page 70: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/70.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
“To understand computations in R, two slogans are helpful:Everything that exists is an object.Everything that happens is a function call.”
John Chambers (Inventor of R).
Parthasarathi Edupally Introduction to Computing Using R
![Page 71: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/71.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
“To understand computations in R, two slogans are helpful:Everything that exists is an object.Everything that happens is a function call.”
John Chambers (Inventor of R).
Parthasarathi Edupally Introduction to Computing Using R
![Page 72: Introduction to computing_using_r](https://reader033.fdocuments.in/reader033/viewer/2022060111/55629da0d8b42a68128b58d9/html5/thumbnails/72.jpg)
Motivation and ObjectiveFundamentals
Further Reading and ReferencesThank You
Thank You
Parthasarathi Edupally Introduction to Computing Using R