SlideShare a Scribd company logo
1 of 6
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

Similar to R DATE TIME and FACTORS

ESRI ERUC 2014 - Easy Automation for Process Efficiencies
ESRI ERUC 2014 - Easy Automation for Process EfficienciesESRI ERUC 2014 - Easy Automation for Process Efficiencies
ESRI ERUC 2014 - Easy Automation for Process EfficienciesTammy Kobliuk
 
[Webinar] 8 Mobile Forms for Construction
[Webinar] 8 Mobile Forms for Construction[Webinar] 8 Mobile Forms for Construction
[Webinar] 8 Mobile Forms for ConstructionGoFormz
 
Methods for analyzing and mapping temporal data
Methods for analyzing and mapping temporal dataMethods for analyzing and mapping temporal data
Methods for analyzing and mapping temporal dataAileen Buckley
 
Advanced Data Interoperability: LiDAR, 3D, and BIM - Esri UC 2015
Advanced Data Interoperability:LiDAR, 3D, and BIM - Esri UC 2015Advanced Data Interoperability:LiDAR, 3D, and BIM - Esri UC 2015
Advanced Data Interoperability: LiDAR, 3D, and BIM - Esri UC 2015Safe Software
 
Webinar: The Top Mobile Forms for Construction
Webinar: The Top Mobile Forms for ConstructionWebinar: The Top Mobile Forms for Construction
Webinar: The Top Mobile Forms for ConstructionGoFormz
 
Analyzing and mapping space-time data
Analyzing and mapping space-time dataAnalyzing and mapping space-time data
Analyzing and mapping space-time dataAileen Buckley
 
Materi Geodatabase Management - Fellowship 2022.pdf
Materi Geodatabase Management - Fellowship 2022.pdfMateri Geodatabase Management - Fellowship 2022.pdf
Materi Geodatabase Management - Fellowship 2022.pdfsakinatunnajmi
 
IMGS GeoDATA 2014 Presentation: Property and Cadastre Management using a Web GIS
IMGS GeoDATA 2014 Presentation: Property and Cadastre Management using a Web GISIMGS GeoDATA 2014 Presentation: Property and Cadastre Management using a Web GIS
IMGS GeoDATA 2014 Presentation: Property and Cadastre Management using a Web GISIMGS
 
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech TalksHow to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech TalksAmazon Web Services
 
Webinar | Accessing Your Data Lake Assets from Amazon Redshift Spectrum
Webinar | Accessing Your Data Lake Assets from Amazon Redshift SpectrumWebinar | Accessing Your Data Lake Assets from Amazon Redshift Spectrum
Webinar | Accessing Your Data Lake Assets from Amazon Redshift SpectrumMatillion
 
Best Data stage online training institute
Best Data stage online training instituteBest Data stage online training institute
Best Data stage online training instituteMindmajix Technologies
 

Similar to R DATE TIME and FACTORS (16)

ESRI ERUC 2014 - Easy Automation for Process Efficiencies
ESRI ERUC 2014 - Easy Automation for Process EfficienciesESRI ERUC 2014 - Easy Automation for Process Efficiencies
ESRI ERUC 2014 - Easy Automation for Process Efficiencies
 
[Webinar] 8 Mobile Forms for Construction
[Webinar] 8 Mobile Forms for Construction[Webinar] 8 Mobile Forms for Construction
[Webinar] 8 Mobile Forms for Construction
 
Methods for analyzing and mapping temporal data
Methods for analyzing and mapping temporal dataMethods for analyzing and mapping temporal data
Methods for analyzing and mapping temporal data
 
Advanced Data Interoperability: LiDAR, 3D, and BIM - Esri UC 2015
Advanced Data Interoperability:LiDAR, 3D, and BIM - Esri UC 2015Advanced Data Interoperability:LiDAR, 3D, and BIM - Esri UC 2015
Advanced Data Interoperability: LiDAR, 3D, and BIM - Esri UC 2015
 
Webinar: The Top Mobile Forms for Construction
Webinar: The Top Mobile Forms for ConstructionWebinar: The Top Mobile Forms for Construction
Webinar: The Top Mobile Forms for Construction
 
Analyzing and mapping space-time data
Analyzing and mapping space-time dataAnalyzing and mapping space-time data
Analyzing and mapping space-time data
 
Introduction to birt
Introduction to birtIntroduction to birt
Introduction to birt
 
Materi Geodatabase Management - Fellowship 2022.pdf
Materi Geodatabase Management - Fellowship 2022.pdfMateri Geodatabase Management - Fellowship 2022.pdf
Materi Geodatabase Management - Fellowship 2022.pdf
 
IMGS GeoDATA 2014 Presentation: Property and Cadastre Management using a Web GIS
IMGS GeoDATA 2014 Presentation: Property and Cadastre Management using a Web GISIMGS GeoDATA 2014 Presentation: Property and Cadastre Management using a Web GIS
IMGS GeoDATA 2014 Presentation: Property and Cadastre Management using a Web GIS
 
Data Warehouse
Data WarehouseData Warehouse
Data Warehouse
 
kalyani.ppt
kalyani.pptkalyani.ppt
kalyani.ppt
 
Data Warehouse
Data WarehouseData Warehouse
Data Warehouse
 
kalyani.ppt
kalyani.pptkalyani.ppt
kalyani.ppt
 
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech TalksHow to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
 
Webinar | Accessing Your Data Lake Assets from Amazon Redshift Spectrum
Webinar | Accessing Your Data Lake Assets from Amazon Redshift SpectrumWebinar | Accessing Your Data Lake Assets from Amazon Redshift Spectrum
Webinar | Accessing Your Data Lake Assets from Amazon Redshift Spectrum
 
Best Data stage online training institute
Best Data stage online training instituteBest Data stage online training institute
Best Data stage online training institute
 

Recently uploaded

Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...HyderabadDolls
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...kumargunjan9515
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...HyderabadDolls
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...HyderabadDolls
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraGovindSinghDasila
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制vexqp
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...HyderabadDolls
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...gajnagarg
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteedamy56318795
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?RemarkSemacio
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...gajnagarg
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...SOFTTECHHUB
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...HyderabadDolls
 
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...HyderabadDolls
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.pptibrahimabdi22
 

Recently uploaded (20)

Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Rohtak [ 7014168258 ] Call Me For Genuine Models We...
 
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
Kalyani ? Call Girl in Kolkata | Service-oriented sexy call girls 8005736733 ...
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting ₹,5K To @25k with A/C...
 
Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?Case Study 4 Where the cry of rebellion happen?
Case Study 4 Where the cry of rebellion happen?
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
TrafficWave Generator Will Instantly drive targeted and engaging traffic back...
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
Lake Town / Independent Kolkata Call Girls Phone No 8005736733 Elite Escort S...
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 

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

  1. 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.
  2. 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.
  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.