how can I add trading days? [duplicate]
This question already has an answer here:
Adding 15 business days in lubridate
5 answers
add 1 business day to date in R
3 answers
for example in a date in thee form 07/03/2015 how can I add 30 trading days??
as.Date("07/03/2015", format="%d/%m/%Y") + 30
[1] "2015-04-06"`
this take into account also Sundays and Saturdays how can I add only the trading days? thanks
r date
marked as duplicate by Ronak Shah
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 12 at 11:48
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Adding 15 business days in lubridate
5 answers
add 1 business day to date in R
3 answers
for example in a date in thee form 07/03/2015 how can I add 30 trading days??
as.Date("07/03/2015", format="%d/%m/%Y") + 30
[1] "2015-04-06"`
this take into account also Sundays and Saturdays how can I add only the trading days? thanks
r date
marked as duplicate by Ronak Shah
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 12 at 11:48
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Adding 15 business days in lubridate
5 answers
add 1 business day to date in R
3 answers
for example in a date in thee form 07/03/2015 how can I add 30 trading days??
as.Date("07/03/2015", format="%d/%m/%Y") + 30
[1] "2015-04-06"`
this take into account also Sundays and Saturdays how can I add only the trading days? thanks
r date
This question already has an answer here:
Adding 15 business days in lubridate
5 answers
add 1 business day to date in R
3 answers
for example in a date in thee form 07/03/2015 how can I add 30 trading days??
as.Date("07/03/2015", format="%d/%m/%Y") + 30
[1] "2015-04-06"`
this take into account also Sundays and Saturdays how can I add only the trading days? thanks
This question already has an answer here:
Adding 15 business days in lubridate
5 answers
add 1 business day to date in R
3 answers
r date
r date
asked Nov 12 at 11:46
Tommaso Dellolmo
75
75
marked as duplicate by Ronak Shah
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 12 at 11:48
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Ronak Shah
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 12 at 11:48
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Is this what you are looking for?
Create data:
library(chron)
dates <- seq.dates("07/03/2015", by = "day", length = 30)
Generate weekdays:
dates <- weekdays(as.Date(dates))
Extract the days of the week:
remove <- c('Saturday', 'Sunday')
dates [! dates %in% remove]
Edited the post.
– user113156
Nov 12 at 12:13
I want display thee 30th trading day after "07/03/2015"
– Tommaso Dellolmo
Nov 12 at 13:08
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this what you are looking for?
Create data:
library(chron)
dates <- seq.dates("07/03/2015", by = "day", length = 30)
Generate weekdays:
dates <- weekdays(as.Date(dates))
Extract the days of the week:
remove <- c('Saturday', 'Sunday')
dates [! dates %in% remove]
Edited the post.
– user113156
Nov 12 at 12:13
I want display thee 30th trading day after "07/03/2015"
– Tommaso Dellolmo
Nov 12 at 13:08
add a comment |
Is this what you are looking for?
Create data:
library(chron)
dates <- seq.dates("07/03/2015", by = "day", length = 30)
Generate weekdays:
dates <- weekdays(as.Date(dates))
Extract the days of the week:
remove <- c('Saturday', 'Sunday')
dates [! dates %in% remove]
Edited the post.
– user113156
Nov 12 at 12:13
I want display thee 30th trading day after "07/03/2015"
– Tommaso Dellolmo
Nov 12 at 13:08
add a comment |
Is this what you are looking for?
Create data:
library(chron)
dates <- seq.dates("07/03/2015", by = "day", length = 30)
Generate weekdays:
dates <- weekdays(as.Date(dates))
Extract the days of the week:
remove <- c('Saturday', 'Sunday')
dates [! dates %in% remove]
Is this what you are looking for?
Create data:
library(chron)
dates <- seq.dates("07/03/2015", by = "day", length = 30)
Generate weekdays:
dates <- weekdays(as.Date(dates))
Extract the days of the week:
remove <- c('Saturday', 'Sunday')
dates [! dates %in% remove]
edited Nov 12 at 12:13
answered Nov 12 at 11:50
user113156
7891417
7891417
Edited the post.
– user113156
Nov 12 at 12:13
I want display thee 30th trading day after "07/03/2015"
– Tommaso Dellolmo
Nov 12 at 13:08
add a comment |
Edited the post.
– user113156
Nov 12 at 12:13
I want display thee 30th trading day after "07/03/2015"
– Tommaso Dellolmo
Nov 12 at 13:08
Edited the post.
– user113156
Nov 12 at 12:13
Edited the post.
– user113156
Nov 12 at 12:13
I want display thee 30th trading day after "07/03/2015"
– Tommaso Dellolmo
Nov 12 at 13:08
I want display thee 30th trading day after "07/03/2015"
– Tommaso Dellolmo
Nov 12 at 13:08
add a comment |