Looking for a function
Sébastien Bihorel
pomchip at free.fr
Mon Feb 8 19:06:54 CET 2010
Hello,
I was wondering if there is a function in Scilab that allows to display
lists in a compact way rather than as a (sometime endless) listing. I did
not see any link to such function in 'help list'. For those of you who are
familiar in the R language, I am looking for something like the 'str'
function, as exemplified below:
> mylist<-list(a=list(abc=1:10,xyz=letters[1:15]),
elem=matrix(1:10,ncol=2))
> mylist
$a
$a$abc
[1] 1 2 3 4 5 6 7 8 9 10
$a$xyz
[1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o"
$elem
[,1] [,2]
[1,] 1 6
[2,] 2 7
[3,] 3 8
[4,] 4 9
[5,] 5 10
> str(mylist)
List of 2
$ a :List of 2
..$ abc: int [1:10] 1 2 3 4 5 6 7 8 9 10
..$ xyz: chr [1:15] "a" "b" "c" "d" ...
$ elem: int [1:5, 1:2] 1 2 3 4 5 6 7 8 9 10
Thanks
Sebastien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100208/bc482662/attachment.htm>
More information about the users
mailing list