Perhaps you could make your question more concrete; to me it reads quite ambiguously.
Its often good when seeking help, to show how you can do a simpler thing, but are missing the knowledge to add a complexity.
In that spirit, could you show how you would model one portoflio weight not incorporating constraints ?
If you are trying to use R to select a model portfolio, have a look at the quantmod package. There are functions there that are designed specifically for determining "optimal" portfolios.