Hi all,
I have scripts that have one variable called 'output', the script
creates a data frame and stores this data frame in 'output'. Then
the data frame is written to disk. This is simple when working with a
single script. However, as soon as one script calls other, variables
overwrite each othe
Possible? Yes (as others have shown), advisable? No, see fortune(106),
fortune(236), and possibly fortune(181).
What is your ultimate goal? Maybe we can help you find a better way.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
On Oct 6, 2010, at 12:58 PM, David Winsemius wrote:
On Oct 6, 2010, at 12:32 PM, Ralf B wrote:
Can one create a variable through a function by name
Isn't that what "<-" does?
createVariable <- function(name) {
outputVariable = name
name <- NULL
}
after calling
createVa
On Oct 6, 2010, at 12:32 PM, Ralf B wrote:
Can one create a variable through a function by name
Isn't that what "<-" does?
createVariable <- function(name) {
outputVariable = name
name <- NULL
}
after calling
createVariable("myVar")
?assign # and isn't this covered in
An alternative to Peter's solution:
createVariable <- function(name) {assign(name, NULL, envir=.GlobalEnv)}
Jeff.
On Wed, Oct 6, 2010 at 12:32 PM, Ralf B wrote:
> Can one create a variable through a function by name
>
> createVariable <- function(name) {
> outputVariable = name
>
On Wed, Oct 6, 2010 at 9:32 AM, Ralf B wrote:
> Can one create a variable through a function by name
>
> createVariable <- function(name) {
> outputVariable = name
> name <- NULL
> }
>
> after calling
>
> createVariable("myVar")
>
> I would like to have a variable myVar initialized w
On Wed, Oct 6, 2010 at 9:32 AM, Ralf B wrote:
> Can one create a variable through a function by name
>
> createVariable <- function(name) {
> outputVariable = name
> name <- NULL
> }
>
> after calling
>
> createVariable("myVar")
>
> I would like to have a variable myVar initialized w
7 matches
Mail list logo