similar to: Simple control structure issue

Displaying 20 results from an estimated 1300 matches similar to: "Simple control structure issue"

2017 Jun 23
0
Simple control structure issue
R is a case-sensitive language: 'if' (lowercase 'i') is a keyword and 'If' (uppercase 'I') is not. Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Jun 23, 2017 at 1:00 PM, Michael Ashton < m.ashton at enduringinvestments.com> wrote: > I am having a hard time with 'next'. I come from the "sloppy" school that > learned BASIC with
2018 May 03
2
adding overall constraint in optim()
Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-) > On May 3, 2018, at 3:01 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > > You can't -- at least as I read the docs for ?optim (but I'm pretty > ignorant
2018 Mar 01
3
RExcel issues
Hi - For a while I've used RExcel without problems to run a repeating portfolio optimization problem where I solve for a portfolio allocation targeting a particular risk, then solve for a different risk, etc. I call the commands with (e.g.) rinterface.Rrun "(R command)" Recently that macro started blowing up, returning #RErrors, and when I try to trace the error I find that it is
2018 Mar 01
0
RExcel issues
> On Mar 1, 2018, at 2:02 PM, Michael Ashton <m.ashton at enduringinvestments.com> wrote: > > Hi - > > For a while I've used RExcel without problems to run a repeating portfolio optimization problem where I solve for a portfolio allocation targeting a particular risk, then solve for a different risk, etc. I call the commands with (e.g.) rinterface.Rrun "(R
2018 May 03
4
adding overall constraint in optim()
Hi ? This is giving me a headache. I?m trying to do a relatively simple optimization ? actually trying to approximate the output from the Excel Solver function but at roughly 1000x the speed. ? The optimization parameters look like this. The only trouble is that I want to add a constraint that sum(wgt.vect)=1, and I can?t figure out how to do that in optim. Mo.vect <-
2018 May 04
0
adding overall constraint in optim()
On Thu, May 3, 2018 at 2:03 PM, Michael Ashton <m.ashton at enduringinvestments.com> wrote: > Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-) > I'm very confused by these statements. Most of the "finance tools"
2018 May 06
1
adding overall constraint in optim()
Hi Michael, A few comments 1. To add the constraint sum(wgt.vect=1) you would use the method of Lagrange multipliers. What this means is that in addition to the w_i (the components of the weight variables) you would add an additional variable, call it lambda. Then you would modify your optim.fun() function to add the term lambda * (sum(wgt.vect - 1) 2. Are you sure that you have defined
2018 May 03
0
adding overall constraint in optim()
You can't -- at least as I read the docs for ?optim (but I'm pretty ignorant about this, so maybe there's a way to tweak it so you can). See here: https://cran.r-project.org/web/views/Optimization.html for other R optimization capabilities. Also, given your credentials, the r-sig-finance list might be a better place for you to post your query. Cheers, Bert Bert Gunter
2018 Feb 02
2
command line fails
Fascinating. The script runs fine in 3.2.5, but won't run in 3.4.3 even with ALL lines commented out. I have no idea what that means. I can't imagine I found a 3.4.3 bug no one knows about. Michael Ashton, CFA Managing Principal Enduring Investments LLC W: 973.457.4602 C: 551.655.8006 -----Original Message----- From: Duncan Murdoch [mailto:murdoch.duncan at gmail.com] Sent: Friday,
2018 May 05
1
adding overall constraint in optim()
Hi, You can use the projectLinear argument in BB::spg to optimize with linear equality/inequality constraints. Here is how you implement the constraint that all parameters sum to 1. require(BB) spg(par=p0, fn=myFn, project="projectLinear", projectArgs=list(A=matrix(1, 1, length(p0)), b=1, meq=1)) Hope this is helpful, Ravi [[alternative HTML version deleted]]
2018 Feb 02
2
command line fails
I don't think it's the path or the slashes. I run other files in this same manner, with the same path to the script itself, and they go off without a hitch. Although this is the first time I am using 3.4.3, and the only script I am using that version of R for at the moment. Having said that, I did TRY reversing the slashes and got the same result. :-) Michael Ashton, CFA Managing
2018 Feb 02
4
command line fails
Hi - Think this is quick help. Not sure how to trap what is causing my simple script to run fine in R, but fail immediately when called from rscript. I can put all sorts of traps in the script itself, but when called from the command line the r window simply flashes and closes. There's probably a way to find out why rscript is failing, but I don't know it and can't seem to find it
2018 Feb 02
0
command line fails
On 02/02/2018 8:20 AM, Michael Ashton wrote: > I don't think it's the path or the slashes. I run other files in this same manner, with the same path to the script itself, and they go off without a hitch. Although this is the first time I am using 3.4.3, and the only script I am using that version of R for at the moment. > > Having said that, I did TRY reversing the slashes and
2018 Feb 02
0
command line fails
On 2/2/2018 4:52 AM, Michael Ashton wrote: > Hi - Think this is quick help. Not sure how to trap what is causing my simple script to run fine in R, but fail immediately when called from rscript. I can put all sorts of traps in the script itself, but when called from the command line the r window simply flashes and closes. > > There's probably a way to find out why rscript is failing,
2010 Jul 07
1
SAM program and R mirror - which port to open?
To whom this may concern, I am having issues installing a program called "SAM" (Statistical Analysis of Microarrays) which is an excel add in and requires the use of R. Due to the firewall at my hospital, R cannot connect to a mirror and therefore cannot install necessary files for the complete installation of SAM. The IT department has asked me which "port" needs to be opened
2018 Feb 02
0
command line fails
On 02/02/2018 7:52 AM, Michael Ashton wrote: > Hi - Think this is quick help. Not sure how to trap what is causing my simple script to run fine in R, but fail immediately when called from rscript. I can put all sorts of traps in the script itself, but when called from the command line the r window simply flashes and closes. > > There's probably a way to find out why rscript is
2004 Aug 02
1
R.dll
Hello After conducting a simulation R closes down reporting the problem I have listed below. These are extracted from the event viewer option under the control panel option in windows. This problem occurs quite often but is as far as I can tell fairly sparadic. I can run identicle programs which run successfully the first time but on the second run it does not (and vise-versa also).
2018 Feb 02
0
command line fails
On Fri, 02 Feb 2018, Michael Ashton writes: > Where can I get the patch? I've never installed a patch for R...usually just upgrade. > > Michael Ashton, CFA > Managing Principal > > Enduring Investments LLC > W: 973.457.4602 > C: 551.655.8006 > The patched build (i.e. a complete version, not just the patch) is available from the same CRAN site at which you find the
2005 Jul 11
1
indexing into and modifying dendrograms
I would like to be able to exert certain types of control over the plotting of dendrograms (representing hierarchical clusterings) that I think is best achieved by modifying the dendrogram object prior to plotting. I am using the "dendrogram" class and associated methods. Define the cluster number of each cluster formed as the corresponding row of the merge object. So, if you are
2004 Sep 10
1
[Flac-users] Winamp 3 plugin
Hi all, I've installed the Winamp 2 plugin and it seems to work fine. However I wish to install the Winamp 3 plugin on another machine but can't find it anywhere. Where is it? Thanks Ashton __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com