Displaying 20 results from an estimated 30 matches for "forner".
Did you mean:
corner
2013 Nov 29
1
How to catch warnings sent by arguments of s4 methods ?
...argh')), warning = function(w)
{ stop('got warning:', w) })
# this does not catch the warning
It seems that the warnings emitted during the evaluation of the
arguments of S4 methods can not get caught using
withCallingHandlers().
Is this expected ? Is there a work-around ?
Best,
Karl Forner
2012 Dec 31
3
weird bug with parallel, RSQlite and tcltk
...;Interrupted system call' in select
2: In selectChildren(ac, 1) : error 'Interrupted system call' in select
Then, just remove library(tcltk), or uncomment
unloadNamespace("tcltk"), and it works fine again.
I guess there's a bug somewhere, but where exactly ?
Best,
Karl Forner
Further info:
R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
ubuntu 12.04 and 12.10
ubuntu package tk8.5
2013 Oct 18
1
Possible problem with namespaceImportFrom() and methods for generic primitive functions
Hi all,
I have a problem with a package that imports two other packages which both
export a method for the `[` primitive function.
I set up a reproducible example here:
https://github.com/kforner/namespaceImportFrom_problem.git
Basically, the testPrimitiveImport package imports testPrimitiveExport1 and
testPrimitiveExport2, which both export a S4 class and a `[` method for the
class.
Then:
R CMD INSTALL -l lib testPrimitiveExport1
R CMD INSTALL -l lib testPrimitiveExport2
The command:
R C...
2013 Oct 29
1
unloadNamespace, getPackageName and "Created a package name xxx " warning
...ame:
>parent.env(getNamespace('data.table'))
<environment: 0x7f6ce4d04040>
attr(,"name")
[1] "imports:data.table"
This namespace has a name that might be used to generate the package name.
My question is: what should be done ?
Thanks for your attention.
Karl Forner
[[alternative HTML version deleted]]
2013 Nov 11
2
problem using rJava with parallel::mclapply
Dear all,
I got an issue trying to parse excel files in parallel using XLConnect, the
process hangs forever.
Martin Studer, the maintainer of XLConnect kindly investigated the issue,
identified rJava as a possible cause of the problem:
This does not work (hangs):
library(parallel)
require(rJava)
.jinit()
res <- mclapply(1:2, function(i) {
2011 Nov 17
3
.Call in R
Hi R developers,
I am new to this forum and hope someone can help me with .Call in R.
Greatly appreciate any help!
Say, I have a vector called "vecA" of length 10000, I generate a vector
called "vecR" with elements randomly generated from Uniform[0,1]. Both vecA
and vecR are of double type. I want to replace elements vecA by elements in
vecR only if sum of elements in
2016 Oct 18
1
weird dir() behavior with broken symlinks
I encountered very weird behavior of the dir() function, that I just can
not understand.
Reproducible example:
docker run -ti rocker/r-base
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
> # setup
> tmp <- tempfile()
> dir.create(tmp)
> setwd(tmp)
>
2014 Jun 19
1
isOpen() misbehaviour
Hello,
>From the doc, it says:
"isOpen returns a logical value, whether the connection is currently open."
But actually it seems to die on closed connections:
> con <- file()
> isOpen(con)
[1] TRUE
> close(con)
> isOpen(con)
Error in isOpen(con) : invalid connection
Is it expected ?
Tested on R-3.0.2 and R version 3.1.0 Patched (2014-06-11 r65921) on
linux x86_64
2010 Sep 16
1
Possible bug or annoyance with library.dynam.unload()
Hello,
I have a package with a namespace. Because I use Roxygen that overwrites the
NAMESPACE file each time it is run, I use a R/zzz.R file with
an .onLoad() and .onUnload() functions to take care of loading and unloading
my shared library.
The problem: if I load my library from a local directory, then the unloading
of the package fails, e.g:
# loads fine
>library(Foo,
2013 Mar 20
0
How to avoid using gridextra via Depends instead of Imports in a package ?
...ome insight on a problem we encountered using grid,
lattice and gridExtra.
I tried to reduce the problem, so the plot make no sense.
we have a package: gridextrabug
with:
DESCRIPTION
------------------
Package: gridextrabug
Title: gridextrabug
Version: 0.1
Author: toto
Maintainer: toto <karl.forner at quartzbio.com>
Description: gridextrabug
Imports:
grid,
gridExtra,
lattice,
latticeExtra,
reshape,
Depends:
R (>= 2.15),
methods
Suggests:
testthat,
devtools
License: GPL (>= 3)
Collate:
'zzz.R'
'plotFDR.R'
R/plotFDR.R
-------...
2014 Mar 05
1
[PATCH] Code coverage support proof of concept
...tput something like:
$`.../testthat/R/auto-test.r`
[,1] [,2]
[1,] 33 1
[2,] 80 1
$`.../testthat/R/colour-text.r`
[,1] [,2]
[1,] 18 1
[2,] 19 106
[3,] 20 106
[4,] 22 106
[5,] 23 106
[6,] 40 1
[7,] 59 1
[8,] 70 1
[9,] 71 106
...
Karl Forner
Disclaimer
-------------
There are probably bugs and ugly statements, but this is just a proof
of concept. This is untested and only run on a linux x86_64
-------------- next part --------------
diff -ruN R-devel/src/library/utils/man/Rcov_start.Rd R-devel-cov/src/library/utils/man/Rcov_start.Rd...
2010 Sep 15
3
warning or error upon type/storage mode coercion?
Hi,
I'm aware that the language definition states "R objects are often
coerced to different types during computations". Two questions:
1. Is it possible to configure the R environment so that, for example,
coercion from (say) numeric to integer will throw a warning or an error?
I realize that in the base R code alone, there are thousands of calls to
as.integer() which would
2015 May 08
0
MAX_NUM_DLLS too low ?
...LLs()))'
gives 28 loaded DLLs.
I am currently trying to work-around that by putting external packages in
Suggests: instead of Imports:, and lazy-load them, but still I am wondering
if that threshold value of 100 is still relevant nowadays, or would it be
possible to increase it.
Thanks,
Karl Forner
[[alternative HTML version deleted]]
2010 Sep 14
1
Best way to manage configuration for openMP support
Hello,
I've written a package that may use OpenMP to speed up computations. OpenMP
is supported in recent Gcc versions by using the -fopenmp flag.
The problem is that flag crashed gcc versions that do not support OpenMP.
So what is the best way for a package to handle this issue. Has someone a
configure script that deals with this ?
Thanks,
Karl
[[alternative HTML version deleted]]
2011 Jan 25
1
dendrogram plot does not draw long labels ?
Hello,
It seems that the plot function for dendrograms does not draw labels when
they are too long.
> hc <- hclust(dist(USArrests), "ave")
> dend1 <- as.dendrogram(hc)
> dend2 <- cut(dend1, h=70)
> dd <- dend2$lower[[1]]
> plot(dd) # first label is drawn
> attr(dd[[1]], "label") <- "aaaaaaaaaaaaaaaaaa"
> plot(dd) # first label is
2012 Feb 23
0
RcppProgress: progress monitoring and interrupting c++ code, request for comments
...}
}
I provided two small R test functions so that you can see how it looks,
please see the doc.
I would be extremely grateful if you could give me comments, criticisms
and other suggestions.
I try to release this in order to reuse this functionality in my other
packages.
Best regards,
Karl Forner
[[alternative HTML version deleted]]
2013 Jun 04
0
bug in package.skeleton(), and doc typo.
...There's also a typo in the doc:
The sentence:
> Otherwise list defaults to the non-hidden **files** in environment (those
whose name does not start with .)
should be
> Otherwise list defaults to the non-hidden **objects** in environment
(those whose name does not start with .)
Best,
Karl Forner
> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8...
2013 Jun 24
0
sys.source() does not provide the parsing info to eval()
...tomic [1:8] 1 1 1 3 1 3 1 1
# .. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile'
<environment: 0x7f42951f3b00>
# NULL
I suppose that the line "for (i in exprs) eval(i, envir)" could be replaced
by "eval(exprs, envir)" ?
Best,
Karl Forner
P.S
> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
...
[[alternative HTML version deleted]]
2014 Jun 12
1
regression bug with getParseData and/or parse in R-3.1.0
Hi,
With R-3.1.0 I get:
> getParseData(parse(text = "{1}", keep.source = TRUE))
line1 col1 line2 col2 id parent token terminal text
7 1 1 1 3 7 9 expr FALSE
1 1 1 1 1 1 7 '{' TRUE {
2 1 2 1 2 2 3 NUM_CONST TRUE 1
3 1 2 1 2 3 5 expr FALSE
4 1 3 1
2010 Sep 28
1
checking user interrupts in C(++) code
Hello,
My problem is that I have an extension in C++ that can be quite
time-consuming. I'd like to make it interruptible.
The problem is that if I use the recommended R_CheckUserInterrupt() method I
have no possibility to cleanup (e.g. free the memory).
I've seen an old thread about this, but I wonder if there's a new and
definitive answer.
I just do not understand why a simple