Would attaching a nested list be close to what you want? E.g.,
x <- list(y1 = list(z = matrix(1:4, 2, 2)), y2=matrix(0, 3, 2)) attach(x) y2
[,1] [,2] [1,] 0 0 [2,] 0 0 [3,] 0 0
attach(y1) z
[,1] [,2] [1,] 1 3 [2,] 2 4 You should be aware that the global environment is #1 on the search list, and you can't attach anything else at position 1. So if you have something in the workspace that has the same name as in what you attach()'ed, the one in the workspace is seen. HTH, Andy
-----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Christoph Lange Sent: Tuesday, January 27, 2004 5:43 AM To: R Help List Subject: [R] Directory-like data organisation w/ environments? Dear r-users! I wonder if there is a way of designing a directory like structure for holding my data using environments? It would be nice if I could implement a kind of 'cd' command to change to a differend environment etc. Can anybody give me a hint? -cl -- Christoph Lange MPI fuer biologische Kybernetik |Phone: +49-7071-601-607| Postfach 2169, D-72012 Tuebingen |FAX: +49-7071-601-616|
______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments,...{{dropped}}