similar to: Backquote in R syntax

Displaying 20 results from an estimated 10000 matches similar to: "Backquote in R syntax"

2004 Aug 28
6
model.matrix.default chokes on backquote (PR#7202)
Full_Name: Gabor Grothendieck Version: R version 1.9.1, 2004-08-03 OS: Windows XP Submission from: (NULL) (207.35.143.52) The following gives an error: > `a(b)` <- 1:4 > `c(d)` <- (1:4)^2 > lm(`a(b)` ~ `c(d)`) Error in model.matrix.default(mt, mf, contrasts) : model frame and formula mismatch in model.matrix() To fix it replace this line in model.matrix.default:
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
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:
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
2006 Oct 06
1
Sum of Bernoullis with varying probabilities
Hi Folks, Given a series of n independent Bernoulli trials with outcomes Yi (i=1...n) and Prob[Yi = 1] = Pi, I want P = Prob[sum(Yi) = r] (r = 0,1,...,n) I can certainly find a way to do it: Let p be the vector c(P1,P2,...,Pn). The cases r=0 and r=n are trivial (and also are exceptions for the following routine). For a given value of r in (1:(n-1)), library(combinat) Set <- (1:n)
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 Sep 02
9
The Perils of PowerPoint
Hi all, Below is a URL for an editorial published today in our local newspaper, the Minneapolis StarTribune. It was originally published in the Washington Post a couple of days ago: http://www.washingtonpost.com/wp-dyn/content/article/2005/08/29/AR2005082901444.html but that site requires registration. The 'Strib" site seems to be open for the moment:
2003 Oct 31
2
How to grow an R object from C (.Call Interface)
What is the best way to grow an R return object in writing a C function using the Rdefines.h macros. In my application, the final size of the return object is not known during construction. My understanding is that each time I grow an R object I have to use PROTECT() again, probably before UNPROTECTing the smaller version. However, due to the stack character of the PROTECT mechanism, UNPROTECT
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
2009 Sep 22
2
cannot build R-devel (>= r49747)
Hello, I've tried several times yesterday to build R-devel and I consistently get this error when I "make" : mkdir -p -- ../../../library/base/R make[3]: Leaving directory `/tmp/R-devel/src/library/profile' make[3]: Entering directory `/tmp/R-devel/src/library/base' building package 'base' make[4]: Entering directory `/tmp/R-devel/src/library/base' mkdir -p --
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.
2008 Aug 04
2
Parsing code with newlines
Dear List, When I try to parse code containing newline characters with R_ParseVector, I get a compilation error. How can I compile code that includes comments and newlines? I am using the following: void* my_compile(char *code) { SEXP cmdSexp, cmdExpr = R_NilValue; ParseStatus status; PROTECT (cmdSexp = allocVector (STRSXP, 1)); SET_STRING_ELT (cmdSexp, 0, mkChar (code));
2007 Nov 29
2
Overriding resources in a define in a module - can''t get syntax right
Maybe it works, maybe it doesn''t, but I sure as hell can''t make it work. I get stuck with "Could not find object(s)" whatever I do This is my module init.pp class ztest::setup { notice "MAIN SETUP CLASS" file { directfile: path => "/etc/directfile", owner => root, group => root, mode => 0644, content
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 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
2009 Jan 08
1
Callbacks seems to get GCed.
Dear list, I am trying to implement a publish-subscribe mechanism in for an embedded R interpreter. But somehow my registered closures seem to get collected by the GC, even though I have protected them. I have reducted my code to the following sample. Sorry if it is a little verbose. The first couple of call of calls still work, but at some point one of the callbacks (callback1 in my
2009 Nov 28
1
PROTECT and OCaml GC.
Hello. In the writing of my OCaml-R binding, I'm sort of confused when it comes to the use of the PROTECT and UNPROTECT macros. Basically, I have C stub functions that are in charge of calling R for everything. Here's a simple example: > CAMLprim value r_findvar (value symbol) { > /* The findVar function is defined in envir.c. It looks up a symbol > in an environment.
2008 Oct 01
1
regexpr syntax question
Greetings R list, I am stuck on a simple syntax problem. I want to list all files in a directory, excluding files of a certain type. I have tried pattern matching as follows: a <- list.files(data, full.name = TRUE, pattern != ".xml") # exclude all .xml files The warning returns that my syntax is incorrect. I have read the regexpr help files and search old posts to no
2008 Nov 08
4
Variable mpid - what is it?
DTraceToolkit has a dtrace script (Proc/pidpersec.d) that refers to a variable mpid as below profile:::tick-1sec { printf("%-22Y %8d %6d\n", walltimestamp, `mpid, pids); pids = 0; } Where is `mpid getting picked from (it isn''t declared anywhere else)? What does the character ` in `mpid signify? I do not see any reference to this variable in the dtrace