R to VBA
Chris
-
Chris128 Messages postés 1 Date d'inscription Statut Membre Dernière intervention -
Chris128 Messages postés 1 Date d'inscription Statut Membre Dernière intervention -
Bonjour à tous,
Est-ce que quelqu'un saurait traduire ce code R en VBA :
rw<-rnorm(100)
m<-median(rw)
trade<-rep(0,length(rw))
for(i in 1:(length(rw)-1)){
if(rw[i] < m) trade[i]<- (rw[i+1]-rw[i])
if(rw[i] > m) trade[i]<- (rw[i]-rw[i+1])
if(rw[i] == m) trade[i]<- 0}
eq_curve<-cumsum(trade)
par (mfrow = c(2, 1))
plot(rw,type='l',main='random walk')
plot(eq_curve,type='l',main='eq_curve')
Un grand merci d'avance.
Chris
Est-ce que quelqu'un saurait traduire ce code R en VBA :
rw<-rnorm(100)
m<-median(rw)
trade<-rep(0,length(rw))
for(i in 1:(length(rw)-1)){
if(rw[i] < m) trade[i]<- (rw[i+1]-rw[i])
if(rw[i] > m) trade[i]<- (rw[i]-rw[i+1])
if(rw[i] == m) trade[i]<- 0}
eq_curve<-cumsum(trade)
par (mfrow = c(2, 1))
plot(rw,type='l',main='random walk')
plot(eq_curve,type='l',main='eq_curve')
Un grand merci d'avance.
Chris
A voir également:
- R to VBA
- Qwerty to azerty - Guide
- Incompatibilité de type vba ✓ - Forum Programmation
- Video to video - Télécharger - Conversion & Codecs
- Your device ran into a problem and needs to restart - Forum Windows 10
- Majuscule to minuscule - Guide