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

Spreadsheets Concepts and Vocab
Spreadsheets Concepts and VocabSpreadsheets Concepts and Vocab
Spreadsheets Concepts and Vocab
Danny Ambrosio
 
Spreadsheet fundamentals
Spreadsheet fundamentalsSpreadsheet fundamentals
Spreadsheet fundamentals
crystalpullen
 
Spreadsheets and databases
Spreadsheets and databasesSpreadsheets and databases
Spreadsheets and databases
Diana A. Pérez
 
Excel & database terms & definitions
Excel & database terms & definitionsExcel & database terms & definitions
Excel & database terms & definitions
Rozell Sneede
 

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

DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.pptDATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
yarotos643
 

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 (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

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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...
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

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.