Displaying 20 results from an estimated 20000 matches similar to: "correction....."
2024 Jul 27
1
plotting nnet function....
Dear members,
I am using caret for modelling my data. It is a regression problem. My question is : how to plot the final model on the actual data points? The output of the model will be a nonlinear form of the activation function; I want to plot it on the data points. I have researched on web but to no effect. Like drawing a line on the original data points, for a
2023 Mar 19
1
lexical scoping for scripts......
Again, the answer is "interactivity does not matter".
On March 19, 2023 12:54:28 PM PDT, akshay kulkarni <akshay_e4 at hotmail.com> wrote:
>Dear Jeff,
> I will not be running R command in the shell prompt. So there is no banner, no > prompt. Just running "myscript.R" from the shell prompt. or from crontab in Linux. I think you get the
2023 Mar 19
1
lexical scoping for scripts......
Dear Jeff,
I will not be running R command in the shell prompt. So there is no banner, no > prompt. Just running "myscript.R" from the shell prompt. or from crontab in Linux. I think you get the context.....
thanking you,
yours sincerely
AKSHAY M KULKARNI
________________________________
From: Jeff Newmiller <jdnewmil at dcn.davis.ca.us>
Sent: Monday, March
2023 Mar 19
1
lexical scoping for scripts......
On 19/03/2023 2:55 p.m., akshay kulkarni wrote:
> Dear Duncun,
> ? ? ? ? ? ? ? ? ? ? ? ? ?What if there is no interactive "session"
> running? I will be running my scripts automatically from crontab in Linux.
I was talking about the session that is created for the duration of the
BATCH run, not some other session that may be running in another
process. Sorry for the
2023 Apr 04
1
on lexical scoping....
No, there are lots of situations where that doesn't make sense. You
don't want to have to define local copies of the functions from every
package you use, for example.
I think the takeaway is to learn how R scoping works, and keep things
simple. That's one reason I tend to avoid "tidyverse" packages. There
are a lot of really good ideas in those packages, but
2023 Apr 04
1
on lexical scoping....
Dear Duncan,
THanks for the reply...!
So the takeaway is that define the symbol in the same environment before using it right!?
Thanking you,
Yours sincerely,
AKSHAY M KULKARNI
________________________________
From: Duncan Murdoch <murdoch.duncan at gmail.com>
Sent: Tuesday, April 4, 2023 8:21 PM
To: akshay kulkarni <akshay_e4 at hotmail.com>; Deepayan Sarkar
2023 Apr 09
1
extracting pdf tables...
Dear Jeff,
Thanks for your reply.
I have the following:
> colnames(IDT[[4]])
[1] "X168" "TATA.MOTORS.LIMITED" "TATAMOTORS" "X4"
THe above has to be the first row of IDT[[4]]. The first row is getting parsed as the column name. How do you make that the first row of IDT[[4]]?
Thanking you,
Yours sincerely,
2023 Mar 19
1
lexical scoping for scripts......
What do _you_ mean when you use the term "interactive"? Because R distinguishes between executing code in a function and executing code from the global environment, but it does not care whether a person is doing the typing or not.
I get the feeling that you think of your R code in terms of "scripts" when you should be thinking of your code in terms of functions. What
2023 Mar 19
2
lexical scoping for scripts......
Dear Duncun,
What if there is no interactive "session" running? I will be running my scripts automatically from crontab in Linux.
THanking you,
Yours sincerely,
AKSHAY M KULKARNI
________________________________
From: Duncan Murdoch <murdoch.duncan at gmail.com>
Sent: Monday, March 20, 2023 12:20 AM
To: akshay kulkarni <akshay_e4 at hotmail.com>; R
2023 Apr 04
1
on lexical scoping....
You can't change the basic way R searches, but you can ask for a
different kind of search. For example, to see if "x" exists, you can use
exists("x")
and it will do the default search, but
exists("x", inherits = FALSE)
will only look in the current environment. The get() function has a
similar argument which returns the value
Unfortunately these
2023 Apr 04
1
on lexical scoping....
Dear Deepayan,
THanks for the pithy, pointed reply.
But isn't it risky? Can I somehow get a warning when x is not defined in the global environment but takes on a value from one of the loaded packages? any packages for that?
THanking you,
Yours sincerely,
AKSHAY M KULKARNI
________________________________
From: Deepayan Sarkar <deepayan.sarkar at
2023 Apr 12
1
converting a character matrix into numeric....
Isn't this like trying to tie up the horse after it has left the barn? Why not figure all this out _before_ converting to xts?
On April 12, 2023 12:29:49 PM PDT, akshay kulkarni <akshay_e4 at hotmail.com> wrote:
>Dear Rui,
> Not working. I have entirely removed the column containing % but am still bootless:
>
>> head(coredata(INFYTX))
> INFY
2023 Jan 09
1
return value of {....}
Returning the last value of { is the basis of functions not needing a
return statement. Before R invokes a function (specifically a closure), it
creates a new context. When R evaluates a call to return, it looks for a
context to return from and finds the context of function, ending the
context and the evaluation of the function body early. However, if you
don't use return, R just returns the
2023 Apr 12
1
aborting the execution of a script...
This is what I get:
> source("~/temp/test.R", echo = TRUE)
> print(1)
[1] 1
> stop("here")
Error in eval(ei, envir) : here
I get similar output in every variation I tried. It never prints the 2.
On 12/04/2023 8:13 a.m., akshay kulkarni wrote:
> Dear Duncan,
> ? ? ? ? ? ? ? ? ? ? ? ? ?What if I use source() with echo? I am using
> that in RStudio.
2023 Jan 10
1
return value of {....}
Fair enough, Akshay. Wondering why a design was chosen is reasonable.
There are languages like python that allow unpacking multiple values and it
is not uncommon to return multiple things from some constructs as in this:
>>> a,b,c = { 4, 5, 6 }
>>> a
4
>>> b
5
>>> c
6
But that is a bit of an illusion as the thing in curly braces is a very
2023 Mar 19
1
lexical scoping for scripts......
On 19/03/2023 2:33 p.m., akshay kulkarni wrote:
> Dear Duncun,
> ? ? ? ? ? ? ? ? ? ? ? ? ?thanks for the reply....
>
> So when I run a script in the system command line by R CMD BATCH, the
> objects created in the script cannot be stored in the workspace ,right?
> If yes, how to save them? Moreover, the only way to save the objects
> CREATED from the script permanently is
2023 Jan 10
1
return value of {....}
Dear Avi,
Thanks for your reply...your exhortations are indeed justified...! But one caveat: I was not complaining about anything...just was curious of the rationale of a particular design....Thanks again...
Thanking you,
Yours sincerely,
AKSHAY M KULKARNI
________________________________
From: R-help <r-help-bounces at r-project.org> on behalf of avi.e.gross at gmail.com
2023 Jan 13
1
return value of {....}
R's
{ expr1; expr2; expr3}
acts much like C's
( expr1, expr2, expr3)
E.g.,
$ cat a.c
#include <stdio.h>
int main(int argc, char* argv[])
{
double y = 10 ;
double x = (printf("Starting... "), y = y + 100, y * 20);
printf("Done: x=%g, y=%g\n", x, y);
return 0;
}
$ gcc -Wall a.c
$ ./a.out
Starting... Done: x=2200, y=110
I don't like that
2023 Jan 09
1
return value of {....}
Akshay,
Your question seems a tad mysterious to me as you are complaining about
NOTHING.
R was designed to return single values. The last statement executed in a
function body, for example, is the value returned even when not at the end.
Scoping is another issue entirely. What is visible is another discussion.
So, yes, if you can see ALL the variables, you might see the last one BUT
there
2023 Apr 12
1
converting a character matrix into numeric....
Dear Rui,
Not working. I have entirely removed the column containing % but am still bootless:
> head(coredata(INFYTX))
INFY Historical Data INFY Historical Data INFY Historical Data INFY Historical Data
[1,] "47.26" "44.28" "47.56" "44.28"
[2,] "46.30" "44.92"