SlideShare a Scribd company logo
1 of 11
Data Objects The Dataminingtools.net Team
Data Types R supports the following data types: Numbers Strings Factors Data Frames Tables One Way Tables Two Way Tables
Numbers The "<-" tells R to take the number to the right of the symbol and store it in a variable whose name is given on the left. The "=" symbol can also be used.
Strings > a <- "hello world"  > a [1] "hello world"  > b <- c("hello", “two")  > b [1] "hello" “two"  > b[1] [1] "hello"  Strings can be stored in variables just like numbers!
Factors A factor is a vector object used to specify a discrete classification (grouping) of the components of other vectors of the same length. There are two kinds of factors supported: Ordered Unordered
Factors Factors can be defined like this:
Lists & Data Frames A list is an object consisting of an ordered collection of objects known as its components. There is no particular need for the components to be of the same mode or type, and, for example, a list could consist of a numeric vector, a logical value, a matrix, a complex vector, a character array or a function.
Lists & Data Frames Defining a list:
Lists & Data Frames A data frame is a list with class "data.frame". For a list to be a data frame: The components must be vectors (numeric, character, or logical), factors, numeric matrices, lists, or other data frames. Matrices, lists, and data frames provide as many variables to the new data frame as they have columns, elements, or variables, respectively. Numeric vectors, logicals and factors are included as is, and character vectors are coerced to be factors, whose levels are the unique values appearing in the vector. Vector structures appearing as variables of the data frame must all have the same length, and matrix structures must all have the same row size.
Tables  The function table() allows frequency tables to be calculated from equal length factors. If there are k factor arguments, the result is a k-way array of frequencies.
Tables

More Related Content

What's hot

Glosario sistemas aplicados
Glosario sistemas aplicadosGlosario sistemas aplicados
Glosario sistemas aplicadoscamiquinchis
 
Spreadsheets Concepts and Vocab
Spreadsheets Concepts and VocabSpreadsheets Concepts and Vocab
Spreadsheets Concepts and VocabDanny Ambrosio
 
Spreadsheet fundamentals
Spreadsheet fundamentalsSpreadsheet fundamentals
Spreadsheet fundamentalscrystalpullen
 
Introduction to spreadsheets
Introduction to spreadsheetsIntroduction to spreadsheets
Introduction to spreadsheetsTracy Gilmer
 
Introduction to Basic Spreadsheets
Introduction to Basic SpreadsheetsIntroduction to Basic Spreadsheets
Introduction to Basic SpreadsheetsKingston Tagoe
 
Introduction to spreadsheets
Introduction to spreadsheetsIntroduction to spreadsheets
Introduction to spreadsheetsCasey Robertson
 
Spreadsheet formulas ppt (1)
Spreadsheet formulas ppt (1)Spreadsheet formulas ppt (1)
Spreadsheet formulas ppt (1)Tammy Carter
 
Spreadsheets and databases
Spreadsheets and databasesSpreadsheets and databases
Spreadsheets and databasesDiana A. Pérez
 
Excel & database terms & definitions
Excel & database terms & definitionsExcel & database terms & definitions
Excel & database terms & definitionsRozell Sneede
 
Indexing techniques
Indexing techniquesIndexing techniques
Indexing techniquesHuda Alameen
 
Relational database terms
Relational database termsRelational database terms
Relational database termsSanthiNivas
 
Electronic spreadsheet
Electronic spreadsheetElectronic spreadsheet
Electronic spreadsheetSomveerSingh20
 
Creation of spreadsheets
Creation of spreadsheetsCreation of spreadsheets
Creation of spreadsheetsNITISH SADOTRA
 

What's hot (20)

Glosario sistemas aplicados
Glosario sistemas aplicadosGlosario sistemas aplicados
Glosario sistemas aplicados
 
Data Types
Data TypesData Types
Data Types
 
Spreadsheets Concepts and Vocab
Spreadsheets Concepts and VocabSpreadsheets Concepts and Vocab
Spreadsheets Concepts and Vocab
 
Spreadsheet fundamentals
Spreadsheet fundamentalsSpreadsheet fundamentals
Spreadsheet fundamentals
 
Introduction to spreadsheets
Introduction to spreadsheetsIntroduction to spreadsheets
Introduction to spreadsheets
 
Spreadsheet Concepts
Spreadsheet ConceptsSpreadsheet Concepts
Spreadsheet Concepts
 
Introduction to Basic Spreadsheets
Introduction to Basic SpreadsheetsIntroduction to Basic Spreadsheets
Introduction to Basic Spreadsheets
 
Introduction to spreadsheets
Introduction to spreadsheetsIntroduction to spreadsheets
Introduction to spreadsheets
 
Join intro
Join introJoin intro
Join intro
 
Spreadsheet formulas ppt (1)
Spreadsheet formulas ppt (1)Spreadsheet formulas ppt (1)
Spreadsheet formulas ppt (1)
 
What is a spreadsheet
What is a spreadsheetWhat is a spreadsheet
What is a spreadsheet
 
Spreadsheets and databases
Spreadsheets and databasesSpreadsheets and databases
Spreadsheets and databases
 
Reportch4
Reportch4Reportch4
Reportch4
 
Excel & database terms & definitions
Excel & database terms & definitionsExcel & database terms & definitions
Excel & database terms & definitions
 
Indexing techniques
Indexing techniquesIndexing techniques
Indexing techniques
 
ML whitepaper v0.2
ML whitepaper v0.2ML whitepaper v0.2
ML whitepaper v0.2
 
Relational database terms
Relational database termsRelational database terms
Relational database terms
 
Data structure day1
Data structure day1Data structure day1
Data structure day1
 
Electronic spreadsheet
Electronic spreadsheetElectronic spreadsheet
Electronic spreadsheet
 
Creation of spreadsheets
Creation of spreadsheetsCreation of spreadsheets
Creation of spreadsheets
 

Similar to R Datatypes

Similar to R Datatypes (20)

R training2
R training2R training2
R training2
 
LISP: Data types in lisp
LISP: Data types in lispLISP: Data types in lisp
LISP: Data types in lisp
 
LISP: Data types in lisp
LISP: Data types in lispLISP: Data types in lisp
LISP: Data types in lisp
 
Mql4 manual
Mql4 manualMql4 manual
Mql4 manual
 
Mql4 manual
Mql4 manualMql4 manual
Mql4 manual
 
R language tutorial.pptx
R language tutorial.pptxR language tutorial.pptx
R language tutorial.pptx
 
MS-EXCEL Assignment Help
MS-EXCEL Assignment HelpMS-EXCEL Assignment Help
MS-EXCEL Assignment Help
 
2 data structure in R
2 data structure in R2 data structure in R
2 data structure in R
 
Mat lab.pptx
Mat lab.pptxMat lab.pptx
Mat lab.pptx
 
R programming by ganesh kavhar
R programming by ganesh kavharR programming by ganesh kavhar
R programming by ganesh kavhar
 
Introduction to R _IMPORTANT FOR DATA ANALYTICS
Introduction to R _IMPORTANT FOR DATA ANALYTICSIntroduction to R _IMPORTANT FOR DATA ANALYTICS
Introduction to R _IMPORTANT FOR DATA ANALYTICS
 
Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
 
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.pptDATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
 
5-Lec - Datatypes.ppt
5-Lec - Datatypes.ppt5-Lec - Datatypes.ppt
5-Lec - Datatypes.ppt
 
R교육1
R교육1R교육1
R교육1
 
data structure programing language in c.ppt
data structure programing language in c.pptdata structure programing language in c.ppt
data structure programing language in c.ppt
 
Python
PythonPython
Python
 
Unit-I-DAA.pdf
Unit-I-DAA.pdfUnit-I-DAA.pdf
Unit-I-DAA.pdf
 
Chap09
Chap09Chap09
Chap09
 
Relational model
Relational modelRelational model
Relational model
 

More from r content

Introduction To R
Introduction To RIntroduction To R
Introduction To Rr content
 
R Environment
R EnvironmentR Environment
R Environmentr content
 
Apply Functions in R
Apply Functions in RApply Functions in R
Apply Functions in Rr content
 
Advanced R Graphics
Advanced R GraphicsAdvanced R Graphics
Advanced R Graphicsr content
 
R Statistics
R StatisticsR Statistics
R Statisticsr content
 

More from r content (7)

Introduction To R
Introduction To RIntroduction To R
Introduction To R
 
R Environment
R EnvironmentR Environment
R Environment
 
R Functions
R FunctionsR Functions
R Functions
 
Apply Functions in R
Apply Functions in RApply Functions in R
Apply Functions in R
 
R Graphics
R GraphicsR Graphics
R Graphics
 
Advanced R Graphics
Advanced R GraphicsAdvanced R Graphics
Advanced R Graphics
 
R Statistics
R StatisticsR Statistics
R Statistics
 

Recently uploaded

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

R Datatypes

  • 1. Data Objects The Dataminingtools.net Team
  • 2. Data Types R supports the following data types: Numbers Strings Factors Data Frames Tables One Way Tables Two Way Tables
  • 3. Numbers The "<-" tells R to take the number to the right of the symbol and store it in a variable whose name is given on the left. The "=" symbol can also be used.
  • 4. Strings > a <- "hello world" > a [1] "hello world" > b <- c("hello", “two") > b [1] "hello" “two" > b[1] [1] "hello" Strings can be stored in variables just like numbers!
  • 5. Factors A factor is a vector object used to specify a discrete classification (grouping) of the components of other vectors of the same length. There are two kinds of factors supported: Ordered Unordered
  • 6. Factors Factors can be defined like this:
  • 7. Lists & Data Frames A list is an object consisting of an ordered collection of objects known as its components. There is no particular need for the components to be of the same mode or type, and, for example, a list could consist of a numeric vector, a logical value, a matrix, a complex vector, a character array or a function.
  • 8. Lists & Data Frames Defining a list:
  • 9. Lists & Data Frames A data frame is a list with class "data.frame". For a list to be a data frame: The components must be vectors (numeric, character, or logical), factors, numeric matrices, lists, or other data frames. Matrices, lists, and data frames provide as many variables to the new data frame as they have columns, elements, or variables, respectively. Numeric vectors, logicals and factors are included as is, and character vectors are coerced to be factors, whose levels are the unique values appearing in the vector. Vector structures appearing as variables of the data frame must all have the same length, and matrix structures must all have the same row size.
  • 10. Tables  The function table() allows frequency tables to be calculated from equal length factors. If there are k factor arguments, the result is a k-way array of frequencies.