Hello,

What you want is a list of lists.
Try something like

Parameters <- list(PC_h_m = list(descript = "Point de convergence  
hauteur en metre", value = 5),
        PC_Q_m3 = list(descript = "Point de convergence debit en  
m3/s", value = 805.00))

Hope this helps,

Rui Barradas
 

Citando MAURICE Jean - externe <jean-externe.maur...@edf.fr>:

> HI,
> I am new to R and English is not my natural language.
>
> I am working on an old R application where there is a matrix  
> containing parameters. Something like :
> parametres=matrix(NA,15,3)
> parametres[1,1]<- "Point de convergence hauteur en metre"
> parametres[1,2]<- 5.00
> parametres[1,3]<- "PC_h_m"
> parametres[2,1]<- "Point de convergence debit en m3/s"
> parametres[2,2]<- 805.00
> parametres[2,3]<- "PC_Q_m3"
> and so on.
>> From 15 parameters, we shall reach 40.
>
> I'd like to be able to use something like
> Parameters$PC_h_m$descript to have "Point de convergence hauteur en metre"
> Parameters$PC_h_m$value to have 5
> Parameters$ PC_Q_m3$descript to have "Point de convergence debit en m3/s"
> Parameters$ PC_Q_m3$value to have 805.00
>
> It's a lot more 'readable' by humans ... Is it possible and, if yes, how ?
>
> Thanks in advance for your answers ...Jean in France

 

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to