SlideShare a Scribd company logo
Data ObjectsThe Dataminingtools.net Team
Data TypesR supports the following data types:NumbersStringsFactorsData FramesTablesOne Way TablesTwo Way Tables
NumbersThe "<-" 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!
FactorsA 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:OrderedUnordered
FactorsFactors can be defined like this:
Lists & Data FramesA 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 FramesDefining a list:
Lists & Data FramesA 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

PPTX
General Data structures
PPTX
Spreadsheet basics ppt
PPTX
Spreadsheet terminology
PPT
PDF
Data structures introduction
PPT
Spreadhsheets 1
PPT
spreadsheet program
PPTX
Glosario sistemas aplicados
General Data structures
Spreadsheet basics ppt
Spreadsheet terminology
Data structures introduction
Spreadhsheets 1
spreadsheet program
Glosario sistemas aplicados

What's hot (20)

PDF
Glosario sistemas aplicados
PPTX
PPTX
Spreadsheets Concepts and Vocab
PPT
Spreadsheet fundamentals
PPT
Introduction to spreadsheets
PPTX
Spreadsheet Concepts
PPTX
Introduction to Basic Spreadsheets
PDF
Introduction to spreadsheets
PDF
PPTX
Spreadsheet formulas ppt (1)
PPT
What is a spreadsheet
PPTX
Spreadsheets and databases
PPTX
Reportch4
DOCX
Excel & database terms & definitions
PDF
Indexing techniques
PPTX
ML whitepaper v0.2
PPTX
Relational database terms
PPTX
Data structure day1
PPTX
Electronic spreadsheet
PPTX
Creation of spreadsheets
Glosario sistemas aplicados
Spreadsheets Concepts and Vocab
Spreadsheet fundamentals
Introduction to spreadsheets
Spreadsheet Concepts
Introduction to Basic Spreadsheets
Introduction to spreadsheets
Spreadsheet formulas ppt (1)
What is a spreadsheet
Spreadsheets and databases
Reportch4
Excel & database terms & definitions
Indexing techniques
ML whitepaper v0.2
Relational database terms
Data structure day1
Electronic spreadsheet
Creation of spreadsheets
Ad

Similar to R Datatypes (20)

PDF
R training2
PPTX
LISP: Data types in lisp
PPTX
LISP: Data types in lisp
PPTX
Introduction to R programming Language.pptx
PDF
Mql4 manual
PDF
Mql4 manual
PPTX
R language tutorial.pptx
PPTX
MS-EXCEL Assignment Help
PDF
2 data structure in R
PPT
R-programming with example representation.ppt
PPT
R Programming for Statistical Applications
PPTX
Mat lab.pptx
PPT
R programming by ganesh kavhar
PPTX
Introduction to R _IMPORTANT FOR DATA ANALYTICS
PDF
Symbol table in compiler Design
PPT
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
PDF
C++ PPT IN NUMERICAL METHOD FOR M.Sc PHYSICS
PPT
5-Lec - Datatypes.ppt
PPTX
R교육1
PPT
data structure programing language in c.ppt
R training2
LISP: Data types in lisp
LISP: Data types in lisp
Introduction to R programming Language.pptx
Mql4 manual
Mql4 manual
R language tutorial.pptx
MS-EXCEL Assignment Help
2 data structure in R
R-programming with example representation.ppt
R Programming for Statistical Applications
Mat lab.pptx
R programming by ganesh kavhar
Introduction to R _IMPORTANT FOR DATA ANALYTICS
Symbol table in compiler Design
DATA STRUCTURE AND ALGORITJM POWERPOINT.ppt
C++ PPT IN NUMERICAL METHOD FOR M.Sc PHYSICS
5-Lec - Datatypes.ppt
R교육1
data structure programing language in c.ppt
Ad

More from r content (7)

PPTX
Introduction To R
PPTX
R Environment
PPTX
R Functions
PPTX
Apply Functions in R
PPTX
R Graphics
PPTX
Advanced R Graphics
PPTX
R Statistics
Introduction To R
R Environment
R Functions
Apply Functions in R
R Graphics
Advanced R Graphics
R Statistics

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation theory and applications.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Empathic Computing: Creating Shared Understanding
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Approach and Philosophy of On baking technology
PDF
Electronic commerce courselecture one. Pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Machine learning based COVID-19 study performance prediction
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation theory and applications.pdf
Spectroscopy.pptx food analysis technology
MIND Revenue Release Quarter 2 2025 Press Release
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Empathic Computing: Creating Shared Understanding
NewMind AI Weekly Chronicles - August'25 Week I
Mobile App Security Testing_ A Comprehensive Guide.pdf
Programs and apps: productivity, graphics, security and other tools
Approach and Philosophy of On baking technology
Electronic commerce courselecture one. Pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
“AI and Expert System Decision Support & Business Intelligence Systems”
Machine learning based COVID-19 study performance prediction
Building Integrated photovoltaic BIPV_UPV.pdf
Review of recent advances in non-invasive hemoglobin estimation

R Datatypes

  • 2. Data TypesR supports the following data types:NumbersStringsFactorsData FramesTablesOne Way TablesTwo Way Tables
  • 3. NumbersThe "<-" 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. FactorsA 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:OrderedUnordered
  • 6. FactorsFactors can be defined like this:
  • 7. Lists & Data FramesA 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 FramesDefining a list:
  • 9. Lists & Data FramesA 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.