Indeed. You do not understand lists. The behavior you expect is not how R
works. Have you read "An Introduction to R" where this is explained
(section 6.1). Also chapter 10 and 10.7 in particular for scoping in R.

See also
?with
?within
?eval

and e.g. ?lm or ?xyplot for the ubiquitous use of "data" arguments to tell
where names are to be looked up.

-- Bert

On Mon, Jul 9, 2012 at 11:02 AM, PRAGYA SUR <pragya1...@gmail.com> wrote:

> I am running a program which has an output containing four vectors named
> meanfevs, meanfevns, pfevs, pfevns. I wish to return all four and be able
> to access them later. I used the command
> return(list(a=meanfevs,b=meanfevns,c=pfevs,d=pfevns))
> it did give me the ouput. However the values did not get stored in the
> vectors a,b,c and d and i am not being able to access them later by just
> calling a/b/c/d. Please help.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> 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.
>



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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