# [R] Problem to paste the title of the columns and the rows

From: KOITA Lassana - STAC/ACE <lassana.koita_at_aviation-civile.gouv.fr>
Date: Sat 11 Feb 2006 - 01:19:23 EST

Hi,
This following function works correctly. However, I would like to improve it by adding to the table of result the titles of columns and rows. I prefer to define vector column by : D = (Dj = debit[j] , j=1:length(debit)) and vector row by: J = (Ji = time [ i ], i = 1: length(time))

#################################

forage <- function (time, debit, n,ind)

{
pop <- 16867*(1.025^n)
bes <- pop*ind
requis <- 1.2*ind*pop
#906.83

n <- length(time)
m <- length(debit)
result <- matrix(ncol = m, nrow = n);
for (i in 1:n)

{
for(j in 1:m)

```      {
result[i,j] <- (time[i]*debit[j]) - requis;

}
```

}
#result;

round(result,2)
#round(rbind(pop = pop,bes = bes,requis = requis), 2)
}

forage (time <- seq( 10,24, by = 2),
debit <- c( seq(8.17, 51.43, by = 8.57), 55, 60),20, 0.035)

Lassana KOITA
Etudes de Sécurité et d'Exploitation aéroportuaires / Aerodrome Safety & Statistical analysis
Service Technique de l'Aviation Civile (STAC) / Civil Aviation Technical Department
Direction Générale de l'Aviation Civile (DGAC) / French Civil Aviation Authority
Tel: 01 49 56 80 60
Fax: 01 49 56 82 14
E-mail: Lassana.Koita@aviation-civile.gouv.fr http://www.stac.aviation-civile.gouv.fr/

R-help@stat.math.ethz.ch mailing list