R
DATES TIMES FACTORS
kensights@outlook.com
DATES IN R
• Date objects
• Using as.Date – converts a string into integer
• Number of days from 01/01/1970
• Using your own epoch in as.Date
• Sequence function
• Date + Time objects
• as.POSIXct – suitable for data frames
• as.POSIXlt – human readable
• Uses machines time zone
• Time zone may be specified
DATES IN R
• Operations of date objects
• Weekdays, months, quarters
• diff
• difftime
LUBRIDATE
• Special functions
• ymd, mdy, dmy
• hms, hm
• ymd_hm
• seconds, months, years
• Arithmetic operations
• Explicitly specify units
CATEGORICAL DATA (FACTORS)
• Factors – data type for handling categorical data
• Labels
• Levels
• Creation
• Using factor function
• Label and level are determined alphabetically
• Levels can be user-specified
• Changing the levels
• Reordering the levels
• Reducing the levels
CATEGORICAL DATA (FACTORS)
• Creating factors from continuous data

More Related Content

PPTX
Grafana
PPTX
Maximising the use of 3D data (Tom Timms, STAR APIC)
ODP
5 tuul
PPTX
Implementing Real-Time IoT Stream Processing in Azure
PPTX
Blurring the lines - VGI in aid of Prof. GIS
PPTX
PDF
Grafana selectel
PPTX
CAD Standards by the Use of Civil 3D to Enterprise GIS
Grafana
Maximising the use of 3D data (Tom Timms, STAR APIC)
5 tuul
Implementing Real-Time IoT Stream Processing in Azure
Blurring the lines - VGI in aid of Prof. GIS
Grafana selectel
CAD Standards by the Use of Civil 3D to Enterprise GIS

Similar to R DATE TIME and FACTORS (20)

PDF
20 date-times
PDF
SessionSeven_WorkingWithDatesandTime
PDF
Data Wrangling: Working with Date / Time Data and Visualizing It
PDF
Manipulating data with dates
PPTX
Factors in R (1).pptx
PDF
Spreadsheet Date & Time Functions
PDF
PPTX
R language
PDF
PDF
Data Types
PPTX
Ggplot2 v3
PDF
RDataMining slides-r-programming
PPTX
Moving Data to and From R
PDF
Introduction to R Programming
PDF
R learning by examples
PDF
A short tutorial on r
PDF
04 Reports
PDF
Introduction to r
PPTX
Intro to data science module 1 r
PPT
R Programming for Statistical Applications
20 date-times
SessionSeven_WorkingWithDatesandTime
Data Wrangling: Working with Date / Time Data and Visualizing It
Manipulating data with dates
Factors in R (1).pptx
Spreadsheet Date & Time Functions
R language
Data Types
Ggplot2 v3
RDataMining slides-r-programming
Moving Data to and From R
Introduction to R Programming
R learning by examples
A short tutorial on r
04 Reports
Introduction to r
Intro to data science module 1 r
R Programming for Statistical Applications
Ad

Recently uploaded (20)

PDF
Data Engineering Interview Questions & Answers Data Modeling (3NF, Star, Vaul...
PPTX
A Complete Guide to Streamlining Business Processes
PDF
Transcultural that can help you someday.
PDF
Votre score augmente si vous choisissez une catégorie et que vous rédigez une...
PPTX
Topic 5 Presentation 5 Lesson 5 Corporate Fin
PDF
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
PPT
statistic analysis for study - data collection
PDF
Introduction to the R Programming Language
PDF
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
PDF
Navigating the Thai Supplements Landscape.pdf
PPTX
Introduction to Inferential Statistics.pptx
PPTX
Managing Community Partner Relationships
PPTX
Phase1_final PPTuwhefoegfohwfoiehfoegg.pptx
PDF
Optimise Shopper Experiences with a Strong Data Estate.pdf
PDF
OneRead_20250728_1808.pdfhdhddhshahwhwwjjaaja
PDF
Jean-Georges Perrin - Spark in Action, Second Edition (2020, Manning Publicat...
PDF
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
PPTX
chrmotography.pptx food anaylysis techni
PPTX
Lesson-01intheselfoflifeofthekennyrogersoftheunderstandoftheunderstanded
PPTX
modul_python (1).pptx for professional and student
Data Engineering Interview Questions & Answers Data Modeling (3NF, Star, Vaul...
A Complete Guide to Streamlining Business Processes
Transcultural that can help you someday.
Votre score augmente si vous choisissez une catégorie et que vous rédigez une...
Topic 5 Presentation 5 Lesson 5 Corporate Fin
Systems Analysis and Design, 12th Edition by Scott Tilley Test Bank.pdf
statistic analysis for study - data collection
Introduction to the R Programming Language
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
Navigating the Thai Supplements Landscape.pdf
Introduction to Inferential Statistics.pptx
Managing Community Partner Relationships
Phase1_final PPTuwhefoegfohwfoiehfoegg.pptx
Optimise Shopper Experiences with a Strong Data Estate.pdf
OneRead_20250728_1808.pdfhdhddhshahwhwwjjaaja
Jean-Georges Perrin - Spark in Action, Second Edition (2020, Manning Publicat...
Data Engineering Interview Questions & Answers Cloud Data Stacks (AWS, Azure,...
chrmotography.pptx food anaylysis techni
Lesson-01intheselfoflifeofthekennyrogersoftheunderstandoftheunderstanded
modul_python (1).pptx for professional and student
Ad

R DATE TIME and FACTORS

  • 2. DATES IN R • Date objects • Using as.Date – converts a string into integer • Number of days from 01/01/1970 • Using your own epoch in as.Date • Sequence function • Date + Time objects • as.POSIXct – suitable for data frames • as.POSIXlt – human readable • Uses machines time zone • Time zone may be specified
  • 3. DATES IN R • Operations of date objects • Weekdays, months, quarters • diff • difftime
  • 4. LUBRIDATE • Special functions • ymd, mdy, dmy • hms, hm • ymd_hm • seconds, months, years • Arithmetic operations • Explicitly specify units
  • 5. CATEGORICAL DATA (FACTORS) • Factors – data type for handling categorical data • Labels • Levels • Creation • Using factor function • Label and level are determined alphabetically • Levels can be user-specified • Changing the levels • Reordering the levels • Reducing the levels
  • 6. CATEGORICAL DATA (FACTORS) • Creating factors from continuous data

Editor's Notes

  • #3: For effectively using R for gaining insights from data one needs to have working knowledge of the standard data types and data structures in R.
  • #4: For effectively using R for gaining insights from data one needs to have working knowledge of the standard data types and data structures in R.
  • #5: For effectively using R for gaining insights from data one needs to have working knowledge of the standard data types and data structures in R.
  • #6: For effectively using R for gaining insights from data one needs to have working knowledge of the standard data types and data structures in R.
  • #7: For effectively using R for gaining insights from data one needs to have working knowledge of the standard data types and data structures in R.