Re: [R] Subscript Error

2012-04-05 Thread z2.0
Thanks to you both. Calling recover (an option hitherto unknown to me) helped me identify the problem. For the record, the error occurred in the geom_path() line, not the list concatenation, as I had previously thought. It was a logic problem: when typeof == NULL the function jumped, but i remaine

Re: [R] Subscript Error

2012-04-04 Thread jim holtman
You should have the following statement as part of your startup for R: options(error=utils::recover) When an error occurs, you will be at the stack frame where is happens and you can examine the values of the variables that you are using and this should help a lot in tracking down your problem.

Re: [R] Subscript Error

2012-04-04 Thread Peter Ehlers
On 2012-04-04 14:25, z2.0 wrote: json_dir is a list of JSON lists mapping lat/long route points between locations using CloudMade's API. post_url is the URL of the HTTP request for (n in json_dir) { i = i + 1 if (typeof(json_dir[[i]]) != "NULL") { if

[R] Subscript Error

2012-04-04 Thread z2.0
json_dir is a list of JSON lists mapping lat/long route points between locations using CloudMade's API. post_url is the URL of the HTTP request for (n in json_dir) { i = i + 1 if (typeof(json_dir[[i]]) != "NULL") { if (i == 1) { dat_add