Skip to content
Prev 311932 / 398503 Next

Problem with cbind() and arguments

This is not reproducible. Nor can I figure out why you expected assigning 
"5" to "args[1]" was going to end up with c(3,3,3).

FWIW, I highly recommend that you re-read the Introduction to R,
particularly the sections discussing indexing.

Then you might try

P[[ args[1] ]] <- 3
On Sun, 25 Nov 2012, parlor9 wrote:

            
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                       Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k