Skip to content
Prev 346239 / 398500 Next

I am trying to use assign and paste to assign value to existing variable

On Dec 4, 2014, at 11:24 PM, Dirkse van Schalkwyk, Theuns <theuns at sun.ac.za> wrote:

            
The line above throws an error for too many closing parens, and when a paren is removed it then very reasonably complains about a missing value for "n". After a value of 3 is substituted for `n` the error becomes: Error: value for ?u1? not found. ( It's not clear what value the line provides since it is not assigned to any name.)
I get 17.
This would be much less painful if you built one list with named descendants. 
You can give character values that need to be evaluated to either "[[" or "["

routlist <- list( TimeB=numeric(), TimeE=numeric() )
$TimeB
$TimeB[[1]]
[1]   0   0 400   0   0   0   0   0   0

$TimeB[[2]]
[1] 0 0 0 0 0 0 0 0 0

$TimeB[[3]]
[1] 0 0 0 0 0 0 0 0 0

snipped remainder.