similar to: Dots are not fixed by make.names()

Displaying 20 results from an estimated 9000 matches similar to: "Dots are not fixed by make.names()"

2019 Mar 08
0
Ellipsis and dot-dot-number [Re: Dots are not fixed by make.names()]
Hi In addition to the inconsistency in make.names(), the text in ?Reserved seems incomplete: "Reserved words outside quotes are always parsed to be references to the objects linked to in the ?Description?, and hence they are not allowed as syntactic names (see make.names). They **are** allowed as non-syntactic names, e.g. inside backtick quotes." `..1` and `...` are allowed for
2005 Aug 16
2
Dots in models formulae
I have seen, several times, dots (like this: "y ~." ) in formula descriptions, noticeably in R help. I am unable to see what it does correspond to. Any ideas ? -- --~~ Toulouse, Grenoble, Auch, Arcachon, B??ziers, Paris, Saragosse, L??vignac Sur Save, habitats naturel du Valdo. ~~-- < http://www.le-valdo.com>
2005 Jan 24
2
using eval() with pre-built expression inside function
I'm trying to evaluate a pre-built expression using eval(), e.g. dataset <- data.frame(y = runif(30, 50,100), x = gl(5, 6)) # one like this mf <- expression(model.frame(y~x)) eval(mf, dataset, parent.frame()) # rather than this eval(expression(model.frame(y~x)), dataset, parent.frame()) In the example above there is no problem, the problem comes when I try to do a similar thing
2001 Jan 10
1
eval() bug in plot.formula() ?
I don't have time now to investigate myself, and I'm not feeling like deciding myself if the following is a bug: myplot <- function(dat, cex = 1.2, ...) { if(!is.data.frame(dat <- as.data.frame(dat))) stop("`dat' must be a data.frame") if(any(is.na(match(c("x","y"), names(dat))))) stop("`dat' must have a `x' and a
2005 Jul 04
2
Problems with eval() in connection with match.call()
Dear all, I have a problem when passing parms from one function to another when the argument list is just '...'. Consider this example: foo<-function(){ xx <- 111222 bar(x=xx) } bar <- function(...){ cl <- match.call(expand.dots=TRUE) print(cl) x <- eval(cl$x) print(x) } foo() > bar(x = xx) > Error in eval(expr, envir, enclos) : Object "xx" not
2019 Oct 05
6
should base R have a piping operator ?
Dear R-devel, The most popular piping operator sits in the package `magrittr` and is used by a huge amount of users, and imported /reexported by more and more packages too. Many workflows don't even make much sense without pipes nowadays, so the examples in the doc will use pipes, as do the README, vignettes etc. I believe base R could have a piping operator so packages can use a pipe in
2010 Nov 11
3
Evaluation puzzle
The survexp function can fail when called from another function. The "why" of this has me baffled, however. Here is a simple test case, using a very stripped down version of survexp: survexp.test <- function(formula, data, weights, subset, na.action, rmap, times, cohort=TRUE, conditional=FALSE, ratetable=survexp.us, scale=1, npoints, se.fit,
2008 Mar 09
1
Calling plot with a formula, from within a function, using ..., and xlim
I ran into a weird, to me at least, problem, and hoping someone can shed some light into it. In a nutshell, there seems to be some problem when one calls plot with a formula, from within another function, using ... to pass arguments, and one of those arguments being xlim (and only xlim shows this problem). Here is an example: > plotw <- function(obj,...) { + plot(k~j,
2007 Nov 28
3
using names with functions..
Dear all, I have the following (rather) strange problem.. For some reasons, I finally work with a variable whose name includes an R function, "a.log(z)", say. And that is a problem when I call it in a formula, for instance: > myname<-"a.log(z)" > dd<-data.frame("a.log(z)"=1:10,y=rnorm(10)) > o<-lm(y~1,data=dd) >
2015 Jul 15
3
bquote/evalq behavior changed in R-3.2.1
In 3.1.2 eval does not store the result of the bquote-generated call in the given environment. Interestingly, in 3.2.1 eval does store the result of the bquote-generated call in the given environment. In other words if I run the given example with eval rather than evalq, on 3.1.2 "x" is never stored in "fenv," but it is when I run the same code on 3.2.1. However, the given
2015 Jul 15
2
bquote/evalq behavior changed in R-3.2.1
On Jul 15, 2015, at 12:51 PM, William Dunlap wrote: > I think rapply() was changed to act like lapply() in this respect. > When I looked at the source of the difference, it was that typeof() returned 'language' in 3.2.1, while it returned 'list' in the earlier version of R. The first check in rapply's code in both version was: if (typeof(object) != "list")
2005 Dec 21
2
Newbie - Summarize function
Dear R Users, I have searched through the archives but I am still struggling to find a way to process the below dataset. I have a dataset that has stratum and plot identifier. Within each plot there is variable (Top) stating the number of measurments that should be used to to calculate the mean to the largest "top" elements within one of the vectors (X). I would like to process
2010 Feb 19
3
dot-dot-dot as an actual argument
I could not find any documentation of how dot-dot-dot works when used as an argument in a function call (rather than as a formal argument in a definition). I would appreciate some references to the rules governing situations like: f1<-function(x,y,...){ ? print(x) } f2<-function(...){ ? f1(...) } f2(1,2,3) In the call above how are the three numbers bound to the individual formal
2017 May 09
3
R-3.3.3/R-3.4.0 change in sys.call(sys.parent())
Some formula methods for S3 generic functions use the idiom returnValue$call <- sys.call(sys.parent()) to show how to recreate the returned object or to use as a label on a plot. It is often followed by returnValue$call[[1]] <- quote(myName) E.g., I see it in packages "latticeExtra" and "leaps", and I suspect it used in "lattice" as well. This idiom
2013 Mar 19
1
source, sys.source and error line numbers
Hi, is there a way to retrieve the line number of where en error occurred when sourcing a file in a tryCatch statement? Is it stored somewhere accessible? It is not found in the error object. Consider the following code/output and note the difference in the traceback between source (has line number) and sys.source (has no line number). Thank you, Renaud ######## # code ######## codefile <-
2015 Jul 15
2
bquote/evalq behavior changed in R-3.2.1
David, If you are referring to the solution that would be: rapply(list(test), eval, envir = fenv) I thought I explained in the question that the above code does not work. It does not throw an error, but the behavior is no different (at least in the output or result). Using the above code still results in the x object not being stored in fenv on 3.1.2. Dayne On Wed, Jul 15, 2015 at 4:40 PM,
2008 Apr 19
2
problem in caluclaring the multiple regression
I am trying to calculate the regression for the follwing input data stored in 'data.txt' file.I am reading this and storing it in the variable i .then i am trying to get the predicted value using f1 as dependent and others f2....f10 as independent variables.It is giving the following error. Also i want that i shoul get one predicted value for each row(y). What should i do. Please help me
2010 Mar 30
3
From THE R BOOK -> Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
Dear friends, I am testing glm as at page 514/515 of THE R BOOK by M.Crawley, that is on proportion data. I use glm(y~x1+,family=binomial) y is a proportion in (0,1), and x is a real number. I get the error: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm! But that is exactly what was suggested in the book, where there is no mention of a similar warning. Where am I
2006 Feb 01
1
recover() (PR#8546)
After using options(error=recover), it takes a long time (too long) to get back to the prompt. Look at: Browse[1]> recover() Enter a frame number, or 0 to exit 1: window(test, start = c(15, 1), end = c(17, 1), extend = TRUE) 2: window.ts(test, start = c(15, 1), end = c(17, 1), extend = TRUE) 3: as.ts(window.default(x, ...)) 4: window.default(x, ...) 5: function () 6: eval(quote(browser()),
2004 Aug 09
1
error when calling debugger()
Hi, I am getting an error message when I am trying to run the debugger() on the last.dump. The debugger() stops after I make a selection. Could someone please suggest what it might mean? The R log is included below. This is R-1.8.1 on RH 7.3. Thanks, Vadim > load("last.dump.rda") > debugger(last.dump) Message: Error in split(x, f) : Group length is 0 but data length > 0