Re: [R] Referencing data frames

2009-06-15 Thread Stavros Macrakis
On Mon, Jun 15, 2009 at 12:38 PM, Payam Minoofar < payam.minoo...@meissner.com> wrote: > ...I would like to have a function acquire an object by reference, and > within the function create new objects based on the original object and then > use the name of the original object as the base for the n

Re: [R] Referencing data frames

2009-06-15 Thread Greg Snow
Well, R does not do references like some other languages do (I am not familiar with Igor). Partly because of the danger that references pose (you don't know if a function has just changed you data or not). If you use environments, then you can work with objects in a reference like manner (but

Re: [R] Referencing data frames

2009-06-15 Thread Wacek Kusnierczyk
Payam Minoofar wrote: > IGOR Pro has a built-in function that returns the name of an object as a > string, and I was wondering if R has a similar facility. > ?substitute ?deparse vQ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Referencing data frames

2009-06-15 Thread Payam Minoofar
You are, indeed, correct. I'm still used to the IGOR Pro programming language (for which I even wrote an introductory manual, http://payam.minoofar.com/igor/) The feedback I've gotten has been fantastic, and I know how I'm going to proceed from this point forward. Nevertheless, I'll solicit mor

Re: [R] Referencing data frames

2009-06-15 Thread Greg Snow
Generally when someone asks a question like this, they are trying to program in a different language using R rather than taking advantage of the power of R itself. If you give us more information on what you are trying to accomplish, then we may be able to give better advice on how to accomplis

Re: [R] Referencing data frames

2009-06-12 Thread Steven McKinney
Hi Payam, Here's a basic example using pointless data frames and an otherwise useless function to illustrate the issues you want > ## Fresh R session with nothing yet defined > foo <- data.frame(matrix(1:12, ncol = 3)) > bar <- data.frame(matrix(101:112, ncol = 3)) > > objects() [1] "bar" "foo"

Re: [R] Referencing data frames

2009-06-12 Thread Duncan Murdoch
On 12/06/2009 6:00 PM, Payam Minoofar wrote: Hi, How do I use the string content of a string variable to reference a data frame of the same name? I want to do the typical tasks of 1) building a name with a string variable and using the string variable to create a data frame (or any object) wh