[R] Contextstack overlow

Charles C. Berry cberry at tajo.ucsd.edu
Thu Dec 18 18:15:49 CET 2008


SR,

My answer to the question you posed is "Someone must know, but I do not 
know".

However, I suspect the answer to the question you should have asked is:

See

 	?cut
and
 	?findInterval

HTH,

Chuck


On Thu, 18 Dec 2008, Ranney, Steven wrote:

> All -
>
> I have a number of rows that I am assigning length classes to via
>
> l.class<-with(wae,
>  ifelse((Length>=120)&(Length<130),"125",
>  ifelse((Length>=130)&(Length<140),"135",
>  ifelse((Length>=140)&(Length<150),"145",
>  ifelse((Length>=150)&(Length<160),"155",
>  ifelse((Length>=160)&(Length<170),"165",
>  ifelse((Length>=170)&(Length<180),"175",
>  ...
>  ifelse((Length>=700)&(Length<710),"705",
>  "substock")))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
>
> There are a total of 60 lines and I get a "contextstack overflow" error 
> at line 50.  From reading the archives, it looks as though this is a 
> hard limit but can be changed rather easily.  Unfortunately, I haven't 
> found any specifics on how to change this limit.  Does anyone know how I 
> can edit this upper limit?
>
> Thanks,
>
> SR
>
> Steven H. Ranney
> Graduate Research Assistant (Ph.D)
> USGS Montana Cooperative Fishery Research Unit
> Montana State University
> P.O. Box 173460
> Bozeman, MT 59717-3460
>
> phone: (406) 994-6643
> fax: (406) 994-7479
>
> http://studentweb.montana.edu/steven.ranney
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901



More information about the R-help mailing list