Displaying 20 results from an estimated 5000 matches similar to: "new R package: UNTB"
2007 Oct 05
3
R-2.6.0 package check problems
Hello
One of my packages, untb_1.3-2, passes R CMD check under
MacOSX (and apparently the systems used in the package check
summary page on CRAN) but fails with the following message on
R-2.6.0.tgz compiled last night on my (home) linux box. I hasten
to add that I have never seen this error before on home-compiled
pre-releases of R-2.6.0.
Can anyone help me understand what is going on?
2007 Apr 17
1
no visible binding for global variable
Hello everyone
I am trying to get one of my packages through R's QC.
The package is clean for me under R-2.4.1, R-2.5.0, and
R-devel, but Kurt gets
>
> * checking R code for possible problems ... WARNING
> hypercube: no visible binding for global variable ?f?
Function hypercube() [cut-&-pasted below] is intended to
return an adjacency matrix for an n-dimensional
2004 Nov 18
0
Fwd: Re: 3d scatter plot with drop line
Hi
try this:
p3dpairs <- function(x,x1,
xlim=NULL,ylim=NULL,zlim=NULL,col=par("col"), pch=par("pch"),
cex=par("cex"), ...){
if(is.matrix(x)){
z <- x[,3]
y <- x[,2]
x <- x[,1]
}
if(is.matrix(x1)){
z1 <- x1[,3]
y1 <- x1[,2]
x1 <- x1[,1]
}
if(missing(zlim)) {
z.grid <-
2005 Jan 07
1
Visualizing complex analytic functions using domain coloring
Hi
has anyone coded up domain colouring for visualizing complex analytic
functions
(such as elliptic functions)?
[
the idea is to depict a complex function f(z) using a filled.contour()
variant
in which the hue is given by Arg(f(z)), and the saturation by Mod(f(z)).
]
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
European Way, Southampton SO14 3ZH, UK
tel
2005 Apr 29
1
accuracy of test cases
Hi
I have several methods for evaluating a function. The methods are
algebraically
identical but use different numerical techniques. The different methods
work
better (converge faster, etc) in different parts of the function's
domain.
I am compiling a test suite for a package, and would like to verify
that the
different methods return approximately identical results.
Toy example
2005 Jul 04
1
prototypes for z_sin() and z_cos()
Hi
I have been looking at complex.c and want to access z_cos() and z_sin
() from
C in one of my packages.
There doesn't seem to be a corresponding header file: there is no
complex.h file.
Where are the prototypes of z_sin() and z_cos() for these functions?
grepping didn't help me:
find ~/downloads/R-2.1.1/ -name "*.h " | xargs
egrep "z_cos"
2005 Sep 01
1
generic function S3 consistency warning advice
Hi
section 6.1 of R-exts suggests that a package can take over a
function in the base
package and make it generic.
I want to do this with Re() and have the following lines in my R code:
"Re" <- function(x){UseMethod("Re" )}
"Re.default" <- get("Re" ,pos=NULL,mode="function")
"Re.octonion" <- function(x){give.comp(x,1)}
2006 Jul 26
2
largest acceptable lookup table in a package
Hi
One of my packages needs a look-up table of pre-calculated
numbers in the data directory.
I would like to have the matrix as large as possible.
What is the largest size matrix that would be an acceptable datafile in
an R package?
[
The table is a square, upper triangular matrix
consisting of logs of Stirling numbers calculated by Maple.
As discussed on the List a few days ago (thanks
2006 Sep 01
1
setMethod("Logic", ...)
Hi
In V&R the "polynomial" class is explicitly specified to have no
logical operators:
setMethod("Logic", signature(e1="polynomial"), function(e1,e2){stop
("...")})
I too have a class of objects for which I want to
specify that Logic operators do not work, but executing
setClass("brob",
representation = representation
2007 Jun 27
1
inherits() and virtual classes
Hi
How do I test for an object having a particular virtual class?
In the following, "onion" is a virtual class, and "octonion" is
a non-virtual class contained in onion. The last call
to inherits() gives FALSE [R-2.5.0], when inherits.Rd led
me to expect TRUE.
setClass("onion",
representation = "VIRTUAL"
)
2005 Jan 20
1
Cauchy's theorem
In complex analysis, Cauchy's integral theorem states (loosely
speaking) that the path integral
of any entire differentiable function, around any closed curve, is zero.
I would like to see this numerically, using R (and indeed I would like
to use the
residue theorem as well).
Has anyone coded up path integration?
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
2005 Mar 16
1
problem solved and new insight
Hi
just now I had an apparently insurmountable problem
that's been bugging me for days, but phrasing my question in a form
suitable for the R-help list enabled me to solve my own problem
in two minutes flat.
thanks everyone.
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2005 Apr 13
2
Inf +1i vs 1+Inf*1i
Hi
If I have
a <- Inf + 1i
then
Re(a) is Inf, and Im(a) is 1, as expected.
But if
b <- 1 + Inf * 1i,
then
Im(b) = Inf , as expected, but Re(b) = NaN, which I didn't expect.
Why this asymmetry? How to define an object with Re(b)=1, Im(b)=Inf?
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
2006 Mar 28
2
atan2(1,1i)
Hi
?atan2 says that atan2(y,x)=atan(y/x) for x and y numeric or complex
vectors.
Well, I would expect atan2(1,1i) to be equal to atan(-1i), but
> atan2(1,1i)
Error in atan2(y, x) : Non-numeric argument to mathematical function
> R.version
_
platform powerpc-apple-darwin8.5.0
arch powerpc
os darwin8.5.0
system powerpc, darwin8.5.0
2006 Mar 28
2
atan2(1,1i)
Hi
?atan2 says that atan2(y,x)=atan(y/x) for x and y numeric or complex
vectors.
Well, I would expect atan2(1,1i) to be equal to atan(-1i), but
> atan2(1,1i)
Error in atan2(y, x) : Non-numeric argument to mathematical function
> R.version
_
platform powerpc-apple-darwin8.5.0
arch powerpc
os darwin8.5.0
system powerpc, darwin8.5.0
2006 Aug 22
1
big numbers
Hi
Can I get R to handle really big numbers? I am not interested
in more than (say) 10 sig figs, but I would like to deal with numbers
up to, say, 10^10000.
If
a <- 10^10000
b <- pi* a
I would like "a+b" to return 3.1415926e10000.
Toy example, illustrating why I can't deal with log(a) and log(b),
follows.
f <- function(a,n=100){
out <- rep(0,n)
2006 Dec 04
1
backticks
I noticed just now that
package.skeleton() produces R files in which
the function names are escaped with backticks.
?Quotes says that "The preferred quote is the backtick (`)",
but I don't understand _why_ this is preferred.
?formula gives some clues but points out that there
are no guarantees that formulae using non-syntactic names such as
`like this` will be accepted.
What
2006 Jul 10
1
par(mfrow,mai) and multiple plot problem
Hi
I'm having difficulty with a multiple plot. What I want is 12
plots, all of which are the same size and shape, differing
only in colour. Each one is a square, so there is an asp=1
in the plot call. I'm working in an Sweave environment so I
am free to choose the height and width of the plot.
I want the columns to be labelled at the head (here t=1,2,3)
and the rows to be labelled at
2006 Mar 06
1
combinatorics again
Hi
I want to enumerate all vectors of length "J", whose elements are
integers in the range 1 to S, without regard to ordering.
With J=S=3, the combinations are as follows:
[,1] [,2] [,3]
[1,] 1 1 1
[2,] 1 1 2
[3,] 1 1 3
[4,] 1 2 2
[5,] 1 2 3
[6,] 1 3 3
[7,] 2 2 2
[8,] 2 2 3
[9,] 2
2006 Feb 28
2
lines() and recycled colours
Hi
?lines says
For 'type = "h"', 'col' can be a vector and will be recycled as
needed.
Why doesn't lines() recycle colours for other types?
If I type
> plot(0:1,0:1,type="n")
> lines(runif(11),runif(11),col=c("red","green"))
>
then all ten lines are red, with no warning given. Is there a reason
why