How to create a range of dates in R?

0 votes
How to create a range of dates in R?
Oct 15 in Data Analytics by ch
• 3,290 points
14 views

1 answer to this question.

0 votes

Hey,

See the below example,

> superstore$Order.Date[1]
[1] "2014-11-11"

> seq(superstore$Order.Date[1],length.out = 5,by = "day")
[1] "2014-11-11" "2014-11-12" "2014-11-13" "2014-11-14" "2014-11-15"

length.out is the increment, by is increment based on what part of the date.

answered Oct 28 by Cherukuri
• 31,840 points

Related Questions In Data Analytics

0 votes
1 answer

How to create dummy variables based on a categorical variable of lists in R?

You can use mtabulate in the following way: library(qdapTools) cbind(data[1], ...READ MORE

answered Apr 13, 2018 in Data Analytics by CodingByHeart77
• 3,690 points
576 views
0 votes
1 answer
+1 vote
1 answer

How to convert a list of dataframes in to a single dataframe using R?

You can use the plyr function: data <- ...READ MORE

answered Apr 13, 2018 in Data Analytics by darklord
• 6,170 points
191 views
0 votes
1 answer

How to limit output of a dataframe in R?

For randomly sampling a row/cell where a ...READ MORE

answered Apr 18, 2018 in Data Analytics by kappa3010
• 2,020 points
64 views
0 votes
1 answer

Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE

answered Dec 17, 2017 in Data Analytics by Sudhir
• 1,610 points
58 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,550 points
77 views
0 votes
1 answer

Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,550 points
187 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

The below is the code to perform ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,550 points
121 views
0 votes
2 answers
0 votes
2 answers

How to create a table in R without external file?

Tibble also creates a table-like structure. Use below ...READ MORE

answered Sep 3 in Data Analytics by anonymous
• 31,840 points
72 views