similar to: setting option in function

Displaying 20 results from an estimated 300 matches similar to: "setting option in function"

2011 Sep 01
1
parser does not catch strings without closing quote
Shouldn't the parser complain about unfinished strings in files? It doesn't and will tack on a newline if there isn't one there. > withOption <- function(optionList, expr) { + oldOption <- options(optionList) + on.exit(options(oldOption)) + expr + } > cat(file=tf<-tempfile(), "\"string without closing quote\n") > p <-
2007 May 17
2
Scoped options setting?
Is there any way to set options during the evaluation of a particular expression, with them automatically reset when control leaves that expression, however that happens? Kind of like "let" on a "special" variable does in Lisp. I naively tried with(options(warn=-1), { fit <- fitdistr(data, 'weibull') # complains about NaNs }) but this leaves
2001 Feb 20
1
man pages screwed
Hi all. I just got openssh 2.5.1p1 and when I installed it, it's man pages doesn't seem to be formatted right. I'm on Solaris 8. Here is how it looks: man ssh Reformatting page. Please Wait... done (Secure Shell) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted
2015 Feb 09
1
WISH: eval() to preserve the "visibility" (now value is always visible)
Sorry to intervene. Argument passed to 'eval' is evaluated first. So, eval(x <- 2) is effectively like { x <- 2; eval(2) } , which is effectively { x <- 2; 2 } . The result is visible. eval(expression(x <- 2)) or eval(quote(x <- 2)) or evalq(x <- 2) gives the same effect as x <- 2 . The result is invisible. In function 'eval2', res <-
2020 Feb 29
2
tcl problem with R-3.6.3?
Just built 3.6.3 from source and tcl doesn't work. Worked fine with the same laptop in 3.6.2. Here's the exact error. blurfle$ R --vanilla R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to
2011 Jul 03
0
[LLVMdev] where define the TARGET_80387 in md file ?
thank Ciao! I check the config of llvm-gcc and confirm that -enable-llvm path is right. evenly I rebuild the LLVM 2.9 again, but get the same error.So I checked the generation process of options.h and found some stranage conditions as follows: gawk -f ../../llvm-gcc-4.2-2.9.source/gcc/opt-gather.awk ../../llvm-gcc-4.2-2.9.source/gcc/ada/lang.opt ../../llvm-gcc-4.2-2.9.source/gcc/fortran/lang.opt
2017 Jan 13
4
unlicense
I would like the unlicense (http://unlicense.org/) added to R licenses. Does anyone else think that worthwhile? -- Charles Geyer Professor, School of Statistics Resident Fellow, Minnesota Center for Philosophy of Science University of Minnesota charlie at stat.umn.edu
2003 Nov 04
1
glm offset and interaction bugs (PR#4941)
Full_Name: Charles J. Geyer Version: 1.8.0 OS: i686-pc-linux-gnu (Suse 8.2) Submission from: (NULL) (134.84.86.22) Two bugs (perhaps related, perhaps independent) revealed by the same Poisson regression with offset mydata <- read.table(url("http://www.stat.umn.edu/geyer/5931/mle/seeds.txt")) out.fubar <- glm(seedlings ~ burn01 + vegtype * burn02 + offset(log(totalseeds)),
2005 Aug 21
2
bizarre signif stars in Sweave latex
OK. I give up. I'll ask a stupid question. How do I get the $!#@*$ signif stars line printed by summaries to not look extremely bizarre in the latex produced by Sweave? For example, see p. 7 of http://www.stat.umn.edu/geyer/aster/library/aster/doc/tutor.pdf I can see what the problem is. R emits non-ascii characters (as it is supposed to do), Sweave puts them in the tex file, and
2009 Sep 16
5
piece of code that runs only once
hi, an strange error is happening here in User model i have the following method: def falta_votar Category.find(:all) - votes.collect {|v| v.category} end and in the default.html.erb layout i have: <%= current_user.falta_votar.size %> but it only works once, when i try to access another page i get an error message saying that the falta_votar method is nil, then i have to restart
2008 Feb 12
3
matching last argument in function
I often want to temporarily modify the options() options, e.g. a <- seq(10000001, 10000001 + 10) # some wide object with.options <- function(..., expr) { options0 <- options(...) tryCatch(expr, finally=options(options0)) } Then I can use: with.options(width=160, expr = print(a)) But I'd like to avoid explicitly naming the expr argument, as in: with.options(width=160,
2005 Feb 09
2
Converting RGB YUV and back
Hi all, how can I convert a RGB (24 or 32) image I'm getting from a webcam for example to YUV to compress it with theora, decompress it and convert it back to RGB to draw it? Any suggestions? Best regards, Florian (Stuttgart, GERMANY)
2017 Jan 18
1
unlicense
>>>>> Charles Geyer writes: > In that case, perhaps the question could be changed to could CC0 be > added to the list of R licences. Right now the only CC licence that > is in the R licenses is CC-BY-SA-4.0. Hmm, I see Name: CC0 FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#CC0) OSI: NA (https://opensource.org/faq#cc-zero) URL:
2020 Feb 29
3
tcl problem with R-3.6.3?
I knew I could work around. But this shouldn't happen. And yes. Same problem with your example. blurfle$ R --vanilla R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain
2009 May 24
1
about strauss process
i have trouble in using spatstat package. i want to simulate a community under the Strauss process,which has a parameter gamma that controls interaction strength between points,and Strauss process is defined only for 0 ¡Ügamma ¡Ü 1 and is a model for inhibition between points. my problem is that in my data, many species's estimated gamma is larger than one.so if i still wanna simulate
2017 Jan 18
2
unlicense
On Tue, 2017-01-17 at 22:46 -0500, Kevin Ushey wrote: > It appears that Unlicense is considered a free and GPL-compatible > license; however, the page does suggest using CC0 instead (which is > indeed a license approved / recognized by CRAN). CC0 appears to be > the primary license recommended by the FSF for software intended for > the public domain. I'd second the
2005 Apr 01
2
formulas and frames
I have a design problem. I'm trying to design a package that does something like glm, but 1. the response is multivariate, so I can't be just like glm and get the response variables out of the formula. I decided (perhaps incorrectly) to just supply the response variable names as an argument "response". 2. I have the usual predictor variables. 3. I
2020 Aug 18
3
[libnbd PATCH v3 0/2] Implementing NBD_OPT_LIST
This is a subset of my v2 posting, but limited to just the NBD_OPT_LIST handling. The biggest change since v2 is the addition of added unit testing in all four language bindings (C, python, ocaml, golang). The tests require nbdkit built from git on PATH, and may not be entirely idiomatic, but I at least validated that they catch issues (for example, adding an exit statement near the end of the
2005 Apr 03
2
Error: cannot set length of non-vector
The subject line says it all. How can I find what Error: cannot set length of non-vector means? RTFS is no help. I can find out of course that it comes from "lengthgets", but who called that? Not me! The situation is as follows. I am trying to get a package ready for CRAN. Every time I run "R CMD check" I get this error when building the package vignette. But (!)
2009 Oct 05
2
how to document stuff most users don't want to see
The functions metrop and temper in the mcmc package have a debug = FALSE argument that when TRUE adds a lot of debugging information to the returned list. This is absolutely necessary to test the functions, because one generally knows nothing about the simulated distribution except what what one learns from MCMC samples. Hence you must expose all details of the simulation to have any hope of