Re: [R] dynamic programming

From: Patrick Breheny <>
Date: Sun, 29 May 2011 07:34:35 -0400

On 05/29/2011 06:07 AM, garciap wrote:
> V<-fitness*(c+dive*pfood, t+1)

What are you trying to do in this line? Multiply fitness by two different things at once? The expression


Causes problems in R. If you want to combine them into a vector, you need


Otherwise, please go into greater detail about what you are trying to accomplish with this line of code.

Also, probably not a good idea to have a variable called 'c', as this is bound to lead to confusion with the function for combining objects, 'c()'.

Patrick Breheny
Assistant Professor
Department of Biostatistics
Department of Statistics
University of Kentucky

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 29 May 2011 - 11:36:25 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 29 May 2011 - 12:00:11 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive