similar to: Lexical scoping question

Displaying 20 results from an estimated 4000 matches similar to: "Lexical scoping question"

2003 Feb 01
2
Apparent parser problem (PR#2520)
Let me first admit: I am experiencing this bug on a precompiled binary of R for windows, and I know these are not supported. I am not asking for support, but I thought the R developers would want to know about this. # Define: foo.page <- function(x) x # Then, foo.page("a") # actually invokes the pager (!) on object named "a" (if one is defined). # same thing happens
2002 Dec 06
2
Mutiple page trellis plots with relation = "free" or "sliced"
Hello, Has anyone out there encountered a problem like this: xyplot(Plasma ~ Serum | Analyte, data = sp.df, aspect = 1, layout = c(1, 1, 200), scales = list(relation = "free") ) Gives the error: Error in pretty(x[is.finite(x)], ...) : x must be numeric On the other hand, this works (but I don't want the default of having everything on the same
2003 Oct 27
2
[[<-.data.frame with POSIXt replacement (PR#4808)
Hi, The following seems to be a bug introduced with version 1.8.0 (it worked without error on my installation of version 1.7.0): > test <- data.frame(time = I(c("2003-08-19:22:55:57"))) > test[["time"]] <- strptime(test[["time"]], format = "%Y-%m-%d:%H:%M:%S") Error in "[[<-.data.frame"(`*tmp*`, "time", value =
2003 Apr 29
1
Specifying search position for attached package
When I load an add-on package, is there any way to specify where it ends up in the search path (as with the pos argument to attach())? From the documentation for library(), this doesn't seem like an option. (I know I can detach packages and then reload them in the order I want; I'm looking for a less clumsy way.) Thanks, Jim James A. Rogers, Ph.D. <rogers at cantatapharm.com>
2002 Sep 11
1
.Renviron and Renviron.site (on Windows XP)
Hello, Could someone please tell me why the following doesn't work: I have a file C:\Program Files\R\rw1051\etc\Renviron.site, which contains the line: R_LIBS= "C:/Jim/LocalR-Libraries/FromCran"; "C:/Jim/LocalR-Libraries/Cantata" >From the documentation, I gather that I have put this file in the default location, but to be safe I also explicitly set the R_ENVIRON
2003 Jan 13
2
summarizing dataframe
Hi Listers, Surely, I just have a mental block and there is a more elegant way of creating a summary count (other than extracing it from ftable). I''d like to create a new data.frame containing counts of spell by loc ie have three columns showing spell,loc,count. Below the data.frame... Any help appreciated Thanks Herry spell loc 101 Parts 1 102 Overall 2 105 Parts 1 106
2003 Jul 21
4
generate a series of fucntion
Hi there, I want to generate a large amount of functions, say f=function(x,t) exp(-t[1]-t[2]*g_1(x)-t[3]*g_2(1+x)) where g_1(x) and g_2(x) are from a long list of moments, such as x, x^2, log(x), log(1+x) .. and so on. Any suggestions on how to do this efficiently? thanks a lot. x.w
2003 Sep 03
2
SNK-test
How can I perform a Student-Newman-Keuls-Test for multiple comparision of means in R? (I did not manage to find any specific function in the libraries) Jörg Peter Baresel Technische Universität München Institut für Ackerbau und INformatik im Pflanzenbau D-85354 Freising Lange Point 51 [[alternative HTML version deleted]]
2003 Apr 16
5
besoin d'aide
J'aimerais savoir si la fonction merge() est la seule disponible pour concatener des tableaux de donn?es? Est-ce normal que l'ex?cution soit lente?
2023 Mar 18
1
lexical scoping for scripts......
On 18/03/2023 1:57 p.m., akshay kulkarni wrote: > Dear members, > The documentation for source() says: > > Input is read and parsed from that file until the end of the file is reached, then the parsed expressions are evaluated sequentially in the chosen environment. > > What does this mean? I presume that any objects that are CREATED by the script
2004 Mar 10
1
Question concerning library function "nlme" and lexical scoping
I am running into problems calling the library function nlme from within another function. Basically,the following function (with v a list containing data and initialization values) > testfunc function(dat=v) { test<-nlsList(result~a+(b-a)/(1+(conc/(c+z*cdiff))^d) |rep,start=dat$init,data=dat$mixeddat) return(nlme(test,random=b~1)) } produces the error message Error in eval(expr, envir,
2023 Mar 18
1
lexical scoping for scripts......
Dear members, The documentation for source() says: Input is read and parsed from that file until the end of the file is reached, then the parsed expressions are evaluated sequentially in the chosen environment. What does this mean? I presume that any objects that are CREATED by the script are stored in the Global environment (if local = FALSE), but the rules for
2023 Mar 19
1
lexical scoping for scripts......
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 to save them to the disk, right? THanking you, yours sincerely, AKSHAY M KULKARNI
2023 Apr 04
1
on lexical scoping....
?search and ?environment See also "The R Language Definition" manual for similar such questions. -- Bert On Tue, Apr 4, 2023 at 6:56?AM akshay kulkarni <akshay_e4 at hotmail.com> wrote: > > Dear Members, > I have the following code typed at the console prompt: > > y <- x*10 > > X has not been defined and the above code
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
2000 Mar 21
1
recursion and lexical scoping
To assign values to a matrix in a recursive function, must the matrix be passed as argument and returned as value? thanks -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To:
2011 Mar 16
2
Detecting bad lexical scoping
I've recently hunted down a troublesome bug in my own code, and am looking for an easy mechanism to detect this kind of error in other R code. The problem was an undefined variable inside of a function. Unfortunately, R looked for that variable in the global environment and found it since there was variable with that name in my testing scripts (note to self: do not name things "x").
2023 Apr 05
1
on lexical scoping....
R *does* search the environment stack. > search() [1] ".GlobalEnv" "package:stats" "package:graphics" [4] "package:grDevices" "package:utils" "package:datasets" [7] "package:methods" "Autoloads" "package:base What you seem to be missing is that a package may contain bindings that it
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....
On 04/04/2023 9:56 a.m., akshay kulkarni wrote: > Dear Members, > I have the following code typed at the console prompt: > > y <- x*10 > > X has not been defined and the above code throws an object not found error. That is, the global environment does not contain x. Why doesn't it look further in the environment stack, like that of