Skip to content
Prev 32010 / 398506 Next

<-

Uwe Ligges wrote:
I hadn't come across this use of substring on the left hand side of <-
before. Now, of course, I see it explained on the help page for substr.

What other special functions can appear on the left hand side of <-? Is
there anywhere I can look to find a list? I've come across
  vector[vector of logicals] <- 
  vector[vector of integers] <- 
  data.frame[] <-

One thing I would find very handy is a shortcut for
  res <- myfunc()
  a <- res$val1
  b <- res$val2
Something along the lines of
  list(a=val1,b=val2) <- myfunc()
but I don't know what the right syntax would be or how I'd go about
programming it. Any suggestions?

Damon Wischik.