[R] What does the "<<-" operator mean?
Roy Mendelssohn
Roy.Mendelssohn at noaa.gov
Thu Apr 21 21:55:10 CEST 2011
?assignOps
-Roy M.
On Apr 21, 2011, at 12:08 PM, Cliff Clive wrote:
> I've been reading some code from an example in a blog post (
> http://www.maxdama.com/ here ) and I came across an operator that I hadn't
> seen before. The author used a <<- operator to update a variable, like so:
>
> ecov_xy <<- ecov_xy+decay*(x[t]*y[t]-ecov_xy)
>
> At first I thought it was a mistake and tried replacing it with the usual <-
> assignment operator, but I didn't get the same results. So what does the
> double arrow <<- operator do?
>
> --
> View this message in context: http://r.789695.n4.nabble.com/What-does-the-operator-mean-tp3466657p3466657.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
**********************
"The contents of this message do not reflect any position of the U.S. Government or NOAA."
**********************
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
1352 Lighthouse Avenue
Pacific Grove, CA 93950-2097
e-mail: Roy.Mendelssohn at noaa.gov (Note new e-mail address)
voice: (831)-648-9029
fax: (831)-648-8440
www: http://www.pfeg.noaa.gov/
"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected"
More information about the R-help
mailing list