Displaying 20 results from an estimated 10000 matches similar to: "command line fails"
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,
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
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
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 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
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 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 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
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 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 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 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
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
2012 Mar 05
8
Automating R script with Windows 7
Hi R-users,
I am trying to automate the daily running of a simple R script from Windows
7.
>From previous posts, I understand that this needs to be done with the task
scheduler.
I can schedule my laptop to automatically open R at a certain time, but not
to execute a script.
Secondary question: how do I save a list of R commands so that they get
executed once the file is open?
Right now, I
2018 Apr 25
2
Bug in RScript.exe for 3.5.0
Hi R Developers,
I have found what I think is a bug in the RScript.exe in version 3.5.0 of R for Windows.
When I call Rscript.exe for Version 3.5 of R, it is unable to open the file if the file name or path has a space in it.
As an example of what happens, I saved 2 files with the code:
cat("What do you get when you multiply 6 * 9?")
as C:\foo bar.R and as C:\foo_bar.R
When I in a DOS
2018 Apr 26
2
Bug in RScript.exe for 3.5.0
Fixed in R-devel. I will port to R-patched after more testing.
Tomas
On 04/26/2018 01:52 AM, Tomas Kalibera wrote:
> Thanks for the report. A quick workaround before this gets fixed is to
> add an extra first argument that has no space in it, e.g.
>
> Rscript --vanilla "foo bar.R"
>
> The problem exists on all systems, not just Windows.
>
> Best
> Tomas
>
2008 Aug 04
1
R init file and source()
In the context of calling R from another program (namely gretl,
http://gretl.sourceforge.net ) I'm trying to understand the
interactions of the R init file (corresponding to the environment
variable RPROFILE) and the source() function.
I'll illustrate my problem with the following simplified contrast
implemented in the bash shell (with R 2.7.1).
1. Works fine:
allin at myrtle:~/Rfoo$
2018 Apr 26
2
Bug in RScript.exe for 3.5.0
Hi Tomas,
Thanks for the info about the binary builds; I did install it, however the bug still seems to be there in the current build. The workaround you suggested does work:
C:\>"C:\Program Files\R\R-devel\bin\x64\Rscript.exe" "C:\foo bar.R"
Fatal error: cannot open file 'C:\foo': No such file or directory
C:\>"C:\Program
2018 Apr 27
5
Bug in RScript.exe for 3.5.0
Thanks Tomas,
I confirm the R Under development (unstable) (2018-04-26 r74651) version works for Rscript when the file name has a space, and no arguments are specified.
C:\>"C:\Program Files\R\R-devel\bin\x64\Rscript.exe" "C:\foo bar.R"
R Under development (unstable) (2018-04-26 r74651)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601)
2018 Apr 26
1
Bug in RScript.exe for 3.5.0
Thanks Tomas.
I confirm the quick workaround works for me in the DOS prompt, and when having a shortcut to RScript in SendTo, and when used in the Task Scheduler. I have not tested the R-devel version, due to my unfamiliarity with installing from source code.
-----Original Message-----
From: Tomas Kalibera [mailto:tomas.kalibera at gmail.com]
Sent: Thursday, April 26, 2018 6:34 AM
To: Kerry