How to create a range of dates in R?

0 votes
How to create a range of dates in R?
Oct 15, 2019 in Data Analytics by ch
• 3,380 points
22 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, 2019 by Cherukuri
• 32,440 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,710 points
668 views
0 votes
1 answer

How to create a 2D array of vectors of different lengths in R programming?

You can try making a list of matrices ...READ MORE

answered Feb 1, 2019 in Data Analytics by Sophie may
• 9,920 points
48 views
+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 Sahiti
• 6,290 points
252 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,080 points
73 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
73 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,560 points
102 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,560 points
369 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,560 points
159 views
0 votes
2 answers

How to change the value of a variable using R programming in a data frame?

You are getting this error since the ...READ MORE

answered Aug 16, 2019 in Data Analytics by anonymous
• 32,440 points
1,232 views
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, 2019 in Data Analytics by anonymous
• 32,440 points
91 views