similar to: model.matrix.default chokes on backquote (PR#7202)

Displaying 20 results from an estimated 10000 matches similar to: "model.matrix.default chokes on backquote (PR#7202)"

2006 Aug 07
2
Backquote in R syntax
Hi Folks, Can someone satisfy my curiosity (well, at least about the following query!) Reading the draft proofs of an article I've been asked to look through, I find the typesetter has set what would normally be entered as source("xyz.R") or source('xyz.R') as source(`xyz.R') i.e. it has come out with an opening backquote, then xyz.R, then a closing forward
2018 Mar 08
4
Fwd: Re: [EXTERNAL] Re: backquotes and term.labels
Ben, Looking at your notes, it appears that your solution is to write your own terms() function for lme.? It is easy to verify that the "varnames.fixed" attribute is not returned by the ususal terms function. Then I also need to write my own terms function for the survival and coxme pacakges? Because of the need to treat strata() terms in a special way I manipulate the formula/terms in
2018 Mar 08
1
Fwd: Re: [EXTERNAL] Re: backquotes and term.labels
>>>>> Ben Bolker <bbolker at gmail.com> >>>>> on Thu, 8 Mar 2018 09:42:40 -0500 writes: > Meant to respond to this but forgot. > I didn't write a new terms() function -- I added an attribute to the > terms() (a vector of the names > of the constructed model matrix), thus preserving the information at > the point when
2007 Oct 24
1
Stubbing Kernel.` (backquote)
I''m trying to stub(!) the Kernel.` (backquote) method and I''m having confusing (to me) results. Here''s the method I''m spec''ing: class Barcode ... def raw_barcodes self.make_temporary_copy `OcrBarcode #{self.temp_file_path}` end ... end And this is my (newbish) attempt at the spec: describe "Calling @barcode.raw_barcodes" do
2019 Jan 25
0
[klibc:update-dash] parser: Fix backquote support in here-document EOF mark
Commit-ID: 5048195d282d48b25a9a0164e60cd0e6708ec8a9 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=5048195d282d48b25a9a0164e60cd0e6708ec8a9 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Thu, 15 Mar 2018 18:27:30 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Fri, 25 Jan 2019 02:57:21 +0000 [klibc] parser: Fix backquote
2020 Mar 28
0
[klibc:update-dash] dash: parser: Fix backquote support in here-document EOF mark
Commit-ID: e90b159a00304664ddc94fca392146f4bde1bcec Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=e90b159a00304664ddc94fca392146f4bde1bcec Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Thu, 15 Mar 2018 18:27:30 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:54 +0000 [klibc] dash: parser: Fix
2020 Mar 28
0
[klibc:update-dash] dash: expand: Fix trailing newlines processing in backquote expanding
Commit-ID: 42c84c0c2ed8f5b9a81bd70582edfa9d7ead08be Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=42c84c0c2ed8f5b9a81bd70582edfa9d7ead08be Author: Nikolai Merinov <n.merinov at inango-systems.com> AuthorDate: Mon, 29 Apr 2019 19:13:37 +0500 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: expand:
2018 Mar 07
1
backquotes and term.labels
Thanks to Bill Dunlap for the clarification. On follow-up it turns out that this will be an issue for many if not most of the routines in the survival package: a lot of them look at the terms structure and make use of the dimnames of attr(terms, 'factors'), which also keeps the unneeded backquotes. Others use the term.labels attribute. To dodge this I will need to create a
2006 May 26
1
Kernel#system Kernel#` - Is anyone using these in Rails?
Since my previous question didn''t get much attention, I thought I''d make the subject more expressive. I didn''t realize the list had this much traffic. Is anyone using system or "backquote" to run commands in Rails? These work fine in webrick, but both return nil when running in Apache FCGI. In CGI mode, system seems to work, but backquote doesn''t.
2011 Apr 07
2
replace an expression with its value, or read macros
I know my subject line seems odd, but I want to replace an expression—such as a variable—with its value. For example, I want to paste() some strings together, assign the result to a variable s, then use the value of s as a variable to hold another value. Something like this: import_subjects <- function (start, iterations) { for (i in 1:iterations) { # iterate from start to end s <-
2018 Mar 05
2
backquotes and term.labels
A user reported a problem with the survdiff function and the use of variables that contain a space.? Here is a simple example.? The same issue occurs in survfit for the same reason. lung2 <- lung names(lung2)[1] <- "in st"?? # old name is inst survdiff(Surv(time, status) ~ `in st`, data=lung2) Error in `[.data.frame`(m, ll) : undefined columns selected In the body of the code
2004 Dec 24
6
Sorting problem
Hi I'm using R 2.0 in SuSE 9.2. When I plot data as a boxplot, the boxes appear on the plot in alphabetical order (of group) rather than the order in which they appear in the data. So far, the only thing I can do to fix this is to prefix the group labels with a,b,c...etc to trick R into plotting them in the right order. Can sorting be turned off? How should I address this sensibly? Thanks
2018 Mar 08
0
Fwd: Re: [EXTERNAL] Re: backquotes and term.labels
Meant to respond to this but forgot. I didn't write a new terms() function -- I added an attribute to the terms() (a vector of the names of the constructed model matrix), thus preserving the information at the point when it was available. I do agree that it would be preferable to have an upstream fix ... On Thu, Mar 8, 2018 at 9:39 AM, Therneau, Terry M., Ph.D. via R-devel <r-devel
2007 Apr 08
1
buglet in terms calculations
Hi, Vince and I have noticed a problem with non-syntactic names in data frames and some modeling code (but not all modeling code). The following, while almost surely as documented could be a bit more helpful: m = matrix(rnorm(100), nc=10) colnames(m) = paste(1:10, letters[1:10], sep="_") d = data.frame(m, check.names=FALSE) f = formula(`1_a` ~ ., data=d) tm =
2020 Mar 17
3
new bquote feature splice does not address a common LISP @ use case?
Dear R-devel, There is a new feature in R-devel, which explicitly refers to LISP @ operator for splicing. > The backquote function bquote() has a new argument splice to enable splicing a computed list of values into an expression, like ,@ in LISP's backquote. Although the most upvoted SO question asking for exactly LISP's @ functionality in R doesn't seems to be addressed by this
2005 Aug 16
4
as.character and a formula
Dear list, given this formula: > fmla <- formula(y1 ~ spp1 + spp2 + spp3 + spp5) > fmla[[3]] spp1 + spp2 + spp3 + spp5 is this the intended behaviour of as.character: > as.character(fmla[[3]]) [1] "+" "spp1 + spp2 + spp3" "spp5" ? Where does the extra "+" come from? > as.character(fmla) [1] "~"
2004 Mar 24
6
First Variable in lm
Hi all, I just cannot think of how to do it: I want to take the first variable (column) of a data frame and regress it against all other variables. bla <- function (dat) { reg <- lm(whateverthefirstofthevariablenamesis ~., data=dat) return(reg) } What kind of function do I have to take instead of the whateverthefirstofthevariablenamesis, eval(), substitute(), get(), ... to
2018 Mar 08
0
[EXTERNAL] Re: Fwd: Re: Re: backquotes and term.labels
That's more or less right. We wrote a terms.merMod method, which accesses the terms component of the @frame slot, which we have modified upstream ... Do you mean term.labels rather than term.names? BTW ?terms.object says (under the "term.labels" element): Non-syntactic names will be quoted by backticks: this makes it easier to re-construct the formula from the term
2007 Dec 13
1
creating lagged variables
Hi all. I'm looking for robust ways of building lagged variables in a dataset with multiple individuals. Consider a dataset with variables like the following: ## set.seed(123) d <- data.frame(id = rep(1:2, each=3), time=rep(1:3, 2), value=rnorm(6)) ## >d id time value 1 1 1 -0.56047565 2 1 2 -0.23017749 3 1 3 1.55870831 4 2 1 0.07050839 5 2 2 0.12928774 6
2018 Mar 05
0
backquotes and term.labels
I believe this has to do terms() making "term.labels" (hence the dimnames of "factors") with deparse(), so that the backquotes are included for non-syntactic names. The backquotes are not in the column names of the input data.frame (nor model frame) so you get a mismatch when subscripting the data.frame or model.frame with elements of terms()$term.labels. I think you can