similar to: conv() example in R-exts

Displaying 20 results from an estimated 3000 matches similar to: "conv() example in R-exts"

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 <-
2007 Nov 09
2
rowSums() and is.integer()
Hi [R-2.6.0, macOSX 10.4.10]. The helppage says that rowSums() and colSums() are equivalent to 'apply' with 'FUN = sum'. But I came across this: > a <- matrix(1:30,5,6) > is.integer(apply(a,1,sum)) [1] TRUE > is.integer(rowSums(a)) [1] FALSE > so rowSums() returns a float. Why is this? -- Robin Hankin Uncertainty Analyst National Oceanography Centre,
2005 May 29
2
"text"-function: adding text in an x,y-plot
Hello R-friends, i have a question to the "text"-function. a little test-dataset for better understanding: -the dataset was imported with read.table(....,header=TRUE) s1-s10 are the samplenames var1 var2 var3 s1 1 1 2 s2 2 3 1 s3 2 2 3 s4 5 4 3 s5 4 2 3 s6 6 3 2 s7 8 5 4 s8 7 2 1 s9 9 3 2
2018 Oct 31
2
Again NFSv4 and Kerberos at the 'samba way'...
> > In computer terms, It's a 0 or 1, always.. Yes, i say no.. ( sort > > off.. ) > > > > A door is open or closed, yes, .... No... ;-) > > Well it could be a glass object as well, what is it called ?? Oh I > know, a jar LOL > > Rowland > So for you a door is the same as a glass object, hmm , then try going throug that glass object... :-p
2003 Sep 16
2
gam and concurvity
Hello, in the paper "Avoiding the effects of concurvity in GAM's .." of Figueiras et al. (2003) it is mentioned that in GLM collinearity is taken into account in the calc of se but not in GAM (-> results in confidence interval too narrow, p-value understated, GAM S-Plus version). I haven't found any references to GAM and concurvity or collinearity on the R page. And I
2004 Jul 27
1
library manual: documentation of funcs not alphabetically ordered
Hello everybody I'm putting finishing touches to a library, and have noticed that the .dvi file that R CMD check creates does not sort the functions in alphabetical order. I find this odd because I used the "tidy" routines in section 3.1 of the R-exts manual, which produce R code in which the functions are alphabetically ordered (and I performed R CMD check using the
2005 Sep 16
5
Table belongs_to self - good idea?
Hi, I have a somewhat complicated relationship question. I''ve been banging my head about this for some time and have given in and decided to ask the list :) Here''s what I''m trying to achieve: Products can have variants. For example, a t-shirt could come in small, medium and large, but also black, green and blue in the first two sizes, but only blue in large.
2004 Jan 14
1
arrows on contour lines
Hello everybody I'm using contour() to draw streamlines of potential flow, eg jj <- seq(from= -4, to=4,len=20) jj <- outer(jj,jj,function(x,y){x})+1i*outer(jj,jj,function(x,y){y}) f <- function(x){x^2} contour(Im(f(jj)), nlevels=44 , labels="") How best to put arrows on the contour lines to show the direction of flow? (ie I want contour lines looking like
2004 Nov 11
1
axis lines crossing at origin
Hi how do I make my axes cross at the origin? x <- seq(from=-pi,to=pi,len=30) plot(x,sin(x)) makes the axes cross at about (-pi,-1). How do I get my x and y axes to cross in the centre of the graph, with the sine curve passing through the intersection? I couldn't find anything in ?par or ?axis; searching R-FAQ for "axis" didn't help. -- Robin Hankin Uncertainty
2004 Oct 18
2
concatenating lists elementwise
Hi How do I concatenate two lists element-by-element? Example: list.1 <- list(temperature=c("hot","cold") , size=c("big","medium")) list.2 <- list(temperature=c("lukewarm") , size=c("massive","tiny")) list.wanted <- list(temperature=c("hot","cold","lukewarm") ,
2004 Sep 13
1
Rd files with "%" (was: permuting dimensions)
Professor Ripley thanks for this. Very much appreciated. The original subject line reflected my late-night conviction that the answer might involve passing a strange list to do.call(). Anyway, package magic is broken (only in R-devel, I might add) because I have a function called "%eq%". R-2.0.0 CMD check is stopping (I think) because it interprets the "%" as a
2004 Nov 15
2
argument rationalization
Hi I am writing a bunch of functions that take two, three or four arguments. These functions operate on vectors of the same length; but I want the function to behave sensibly if one or more arguments are scalars. "+" does this for two arguments: "+"(1:10,3) # interpreted as "+"(1:10,rep(3,10)) But my functions can take more arguments. Say f() takes three:
2004 Sep 08
3
do.call("[", ...) question
Hi again everyone I have an arbitrarily dimensional array "a" and a list "jj" of length length(dim(a)). The elements of jj are vectors of indexes. How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3]], ...] ? Toy example follows: a <- matrix(1:30,5,6) jj <- list(5:1,6:1) I want the following a[ jj[[1]],jj[[2]] ] How do I do this? OBAttempts:
2004 Jun 11
4
rownames of single row matrices
Hi I want to extract rows of a matrix, and preserve rownames even if only one row is selected. Toy example: R> a <- matrix(1:9,3,3) R> rownames(a) <- letters[1:3] R> colnames(a) <- LETTERS[1:3] R> a A B C a 1 4 7 b 2 5 8 c 3 6 9 Extract the first two rows: R> wanted <- 1:2 R> a[wanted,] A B C a 1 4 7 b 2 5 8 rownames come through fine. Now extract just
2003 Nov 26
0
new R package: magic squares
Dear List I have just placed a new R package on CRAN that includes many tools for creating and investigating magic squares and hypercubes. Any comments, suggestions, etc very welcome. I am particularly interested in coding up additional algorithms for magic squares, and also in improving the existing methods. -- Robin Hankin Uncertainty Analyst Southampton Oceanography Centre SO14 3ZH tel
2004 Mar 12
1
another do.call() problem.
Hi everyone suppose I have a <- array(1:256,rep(4,4)) and want to access a[1,2,3,1] by the vector c(1,2,3,1). As per yesterday, I can use do.call(): a[1,2,3,1] == do.call("[",c(list(a),c(1,2,3,1))) Now how do I apply the above technique (or indeed any other technique!) to get a[1,2,3,] [1] 37 101 165 229 from a vector like c(1,2,3,0) or c(1,2,3,NULL) or c(1,2,3,NA)?
2004 May 28
1
optim(method="SANN")
Hello List I'm working on a combinatoric problem in which the object is to minimize the badness() of a vector. I think this class of problem is only soluble by optim() using method=SANN. The badness() of anything is >= 0, and when I've found a solution with zero badness, I want optim() to stop (carrying on beyond zero badness cannot improve the solution). Efficiency is crucial here.
2004 Jul 05
1
"make" error for R-1.9.1
Hello everybody. I am trying to upgrade from R-1.9.0 to R-1.9.1 on a RedHat linux 2.4.18 system. I get the following error after "tar -xvzf R-1.9.1.tgz ; cd ./R-1.9.1/ ; ./configure" and "make" : [make works for 10 minutes ... snip ...] varExp text html latex varFixed text html latex varFunc
2004 Sep 07
2
noncommutative addition: NA+NaN != NaN+NA
Hi guys. Check this out: > NaN +NA [1] NaN > NA + NaN [1] NA I thought "+" was commutative by definition. What's going on? > R.version _ platform powerpc-apple-darwin6.8 arch powerpc os darwin6.8 system powerpc, darwin6.8 status major 1 minor 9.0 year 2004 month 04 day 12 language R > (Both give NA under linux, so it looks
2004 Nov 19
0
new package gsl, a wrapper for the Gnu Scientific Library
Dear list R package "gsl" is now on CRAN. This is a wrapper for the special functions of the Gnu Scientific Library (GSL). Functions include elliptic integrals, Airy functions, hypergeometric functions, and so on. Most functions optionally return error estimates. This library is a little odd in that documentation is limited to a pointer to the GSL reference manual, and occasional