0

This code adds information of the low estimate, high estimqted...; zith is in q loop i am trying to put all in the sqme data frame but it onlu create differnt data frames

LOW_ESTIMATE=(valeur_usine)-(erreur_totale)
MEAN_ESTIMATE=valeur_usine
HIGH_ESTIMATE=(valeur_usine)+(erreur_totale)
REAL_VALUE=valeur_relle
erreur_affichée=(erreur_totale/valeur_usine*100)
erreur_SITE=((valeur_usine-valeur_relle)/valeur_usine*100)
 df<-data.frame()

for (i in 1:100) {
  df<-cbind.data.frame(LOW_ESTIMATE,MEAN_ESTIMATE,HIGH_ESTIMATE,REAL_VALUE)
  namecol<- c("LowEstimate","MeanEstimate","HighEstimate","REAL_VALUE")
  names(df)<- namecol
}
print(df)
prosoitos
  • 6,679
  • 5
  • 27
  • 41
  • 1
    Welcome to Stackoverflow! Please have a look at https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example and check your question for typos. You don't use `i` in your loop, each loop generates the same dataframe. – Maximilian Peters Sep 28 '20 at 12:26
  • 1
    Does this answer your question? [Append data frames together in a for loop](https://stackoverflow.com/questions/29402528/append-data-frames-together-in-a-for-loop) – Oliver Sep 28 '20 at 15:23

0 Answers0