similar to: Writing 'domain specific languages' with R

Displaying 20 results from an estimated 300 matches similar to: "Writing 'domain specific languages' with R"

2007 May 28
2
S4 object slot of type 'call'
I'm using an S4 object with a slot of type 'call': I would like to be able to initialize it with something like NULL or NA (indicating that there is no information in the slot) but the value should comply with the fact that it must be of type call. Is there any simple way to obtain this? Thanks for any hint, Roberto -- <r/> | Roberto Brunelli - [scientist at Fondazione
2007 May 31
1
Selective 'expansion' of arguments in a match.call() result ...
Is it possible to write a support function to automatize selective argument expansion (based on argument value type) as in the following example, in order to write terse code even when there are many arguments? Forcing evaluation of all arguments is not a problem ... ______________________________________________Thanks a lot!__________R_ # When called with document = 1, we have the
2008 Nov 19
2
do.call and plotting functions ...
I'm trying to write a simple wrapper for plotting functions to make them print to postscript, something like ploteps <- function(file, plotFunction, ...) { args <- list(bquote(...)) # prepare postscript device do.call(plot, args) # close postscript device } I have inserted the bquote otherwise I get a lot of numbers in the plot when I plot/hist something. But if I invoke
2008 Nov 07
2
Applying a function to a list of arguments ...
How can I apply function f, that I get as an argument as in func <- function(f, ...) { . . . } to a list of arguments list(a, b, c) (eg the ... argument of func above) in order to obtain f(a, b, c) Thanks a lot, Roberto [[alternative HTML version deleted]]
2010 Oct 25
0
Re: MCollective Client Languages (WAS Re: Re: Accessing Facter in other languages than Ruby?)
----- lists@truthisfreedom.org.uk wrote: > We have a team of system administrators within our organisation who love the > look and power of MCollective but are currently "unable" to utilise it fully > as they don''t know ruby (for some reason Python is the language of > choice here!). > > I''m writing a new web interface for our change management
2018 Nov 28
2
4.20.0-rc3 nouveau/Quadro P2000 Mobile: runpm causing ACPI errors, lockups
On Wed, Nov 28, 2018 at 05:55:44PM +0200, Mika Westerberg wrote: > On Wed, Nov 28, 2018 at 10:09:22AM -0500, Michael S. Tsirkin wrote: > > Yea all this is weird, in particular I wonder why does everyone > > using dsm insists on saying Arg4 > > when they actually mean Arg3. ACPI numbers arguments from 0. > > > > So it's a bit ugly, and maybe worth fixing but
2013 Nov 25
2
mcp ping return no responses
I''m trying to install mcollective on an environment for the first time and I''m having troubles: MC client (also the puppet master) activemq.xml <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The
2006 May 17
2
setup.exe from "Marco Polo Großer Reiseplaner 2005/2006" stops
Hi! I'm trying to use "Marco Polo Gro?er Reiseplaner 2005/2006" with Wine 0.9.13 on Gentoo Linux. To use it, I ran travel\setup.exe from the DVD and the setup just stops, before the "real thing" starts. Please see http://www.myimg.de/?img=BildschirmfotoWinedesktopSeaa8.png In the terminal window from which I started wine, I get: alexander@blatt ~ $ wine
2017 Oct 03
2
R CMD Rd2pdf and macros
When I run R CMD Rd2pdf on the man pages of a package, ie R CMD Rd2pdf man I get Converting Rd files to LaTeX Warning in parse_Rd("man/mpra-package.Rd", encoding = "unknown", fragment = FALSE, : man/mpra-package.Rd:6: unknown macro '\packageTitle' Warning in parse_Rd("man/mpra-package.Rd", encoding = "unknown", fragment = FALSE, :
2018 May 14
3
Rd parser throws error for user macros invoked with empty argument
Bug or feature? I get the following error from parse_Rd() when a user Rd macro (including system ones) is invoked with empty argument {}, eg \mymacro{}: Error in tools::parse_Rd(fn) : Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'NULL' A full example is further below with the system macro \CRANpkg{}. In this example it doesn't make sense to use empty argument but
2001 Mar 09
0
Fitting automatically empirical data
Hi, I'm using R to find esplicit functions fitting set of data. The data contains about 30 points, which have different weights (number of cases represented from the point). I plot the points, choose "by eye" a function made with exp or arctg or polinomial and use nlm to minimaze the root mean error with correct the weights. For Example: Err <- function(p) sum((weight*(y
2001 Dec 11
1
how can i have the total for each level using table,ftable,xtabs etc. etc. ?
I have a list with four fields and 3500 records, from a MySQL table. How can i have the total for each level using table, ftable, xtabs? ex: print(ftable(table[,"field1"]~table[,"field2"])) thanks Danilo Maurizio Veneto Lavoro - Area Osservatorio - -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2018 May 25
2
Rd parser throws error for user macros invoked with empty argument
While on the topic of Rd macro arguments, it seems that if a multiline argument is supplied, the lines after the first are silently ignored: f <- tempfile() mac6 <- "\\newcommand{\\mac6}{mac6: #1}" cat(mac6, "\\mac6{2*3 2+2 sin(pi) }\n", file = f) rd <- tools::parse_Rd(f) > rd mac6: 2*3 --- Georgi Boshnakov -----Original Message----- From: Tomas Kalibera
2011 Apr 12
2
parse_Rd raises error when example section contains a quoted percent character
I was writing Rd documentation for a new package when I came across this issue. Here's the smallest example: > library(tools) > cat("\\examples{x <- '<%=rnorm(1)%>'}\n",file=file.path(tempdir(),'test.Rd')) > readLines(file.path(tempdir(),'test.Rd')) [1] "\\examples{x <- '<%=rnorm(1)%>'}" >
2009 Jun 20
2
Special characters in Rd example section will cause errors
Hi (Duncan?), The other day I noticed some characters will cause errors in R CMD CHECK because of parse_Rd(), and AFAIK, these chars include '%', '{' and '}'. For example, note the comments in the example section: %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~% \name{testfun} \Rdversion{1.1} \alias{testfun} \title{ A Test } \description{ A test } \usage{ testfun() } \value{ NULL }
2017 Oct 04
1
R CMD Rd2pdf and macros
No, I do not get the same as you. I have tested with R-devel and R-patched compiled today. When I do R CMD Rd2pdf mpra I get (as reported a few days ago) Hmm ... looks like a package Converting Rd files to LaTeX Error : mpra/man/mpra-package.Rd:6: file './DESCRIPTION' does not exist whereas you (Kurt) reports that this works on zTree. When I do R CMD Rd2pdf mpra/man I get - a
2018 Nov 27
2
4.20.0-rc3 nouveau/Quadro P2000 Mobile: runpm causing ACPI errors, lockups
So a new thinkpad: 01:00.0 VGA compatible controller: NVIDIA Corporation GP107GLM [Quadro P2000 Mobile] (rev a1) Hangs whenever I try to poke at the card. It starts happily enough with [ 3.971515] ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20181003/nsarguments-66) [ 3.971553] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4
2009 Jul 08
2
\dQuote in packages
I am in the process of submitting a package to CRAN. R CMD check ran successfully on the package on my local computer, using R version 2.1.1. However, on the computers for CRAN (with version 2.10.0), the following errors occurred: Warning in parse_Rd("./man/predict.Rd", encoding = "unknown") : ./man/predict.Rd:28: unknown macro '\dquote' *** error on file
2023 Jul 21
1
tools::parseLatex() crashes on "\\verb{}"
? Fri, 21 Jul 2023 15:14:09 +0200 Antoine Fabri <antoine.fabri at gmail.com> ?????: > On a closer look it seems like roxygen2 introduces those, when using > markdown backtick quoting, if the quoted content is not syntactic. For > instance: > > #' `c(c(1)` > #' `c(c(1))` > > Will convert the first line to `\verb{c(c(1)}` and the second to >
2012 Nov 04
1
Rd2pdf freeze
Hi everyone, >From the currently available version of the package VBmix, I would like to retrieve the intermediate .tex file that generates the VBmix-manual.pdf file. Formerly, running R CMD check with --no-clean allowed to get this tex source from a hidden directory : this feature was removed, but can apparently still be accessed through R CMD Rd2pdf --no-clean. Surprisingly, while the