similar to: in par(mfrow=c(1, 2)), how to keep one half plot static and the other half changing

Displaying 20 results from an estimated 6000 matches similar to: "in par(mfrow=c(1, 2)), how to keep one half plot static and the other half changing"

2010 Nov 30
5
how to know if a file exists on a remote server?
Hi, I'd like to download some data files from a remote server, the problem here is that some of the files actually don't exist, which I don't know before try. Just wondering if a function in R could tell me if a file exists on a remote server? I searched this mailing list and after read severals mails, still clueless. Any help will be highly appreciated. B.C.
2007 Mar 22
3
"digits" doesn't work in format function
Dear All, I was trying to format a numeric vector (100*1) by using outd <- format(x=m, sci=F, digits=2) > outd[1:10] [1] " 0.01787758" "-0.14760306" "-0.45806041" "-0.67858525" "-0.64591748" [6] "-0.05918100" "-0.25632276" "-0.15980138" "-0.08359873" "-0.37866688" >m[1:10] [1]
2012 Oct 10
2
lm on matrix data
Hi, I have a question about using lm on matrix, have to admit it is very trivial but I just couldn't find the answer after searched the mailing list and other online tutorial. It would be great if you could help. I have a matrix "trainx" of 492(rows) by 220(columns) that is my x, and trainy is 492 by 1. Also, I have the newdata testx which is 240 (rows) by 220 (columns). Here is
2011 May 16
2
about spearman and kendal correlation coefficient calculation in "cor"
Hi, I have the following two measurements stored in mat: > print(mat) [,1] [,2] [1,] -14.80976 -265.786 [2,] -14.92417 -54.724 [3,] -13.92087 -58.912 [4,] -9.11503 -115.580 [5,] -17.05970 -278.749 [6,] -25.23313 -219.513 [7,] -19.62465 -497.873 [8,] -13.92087 -659.486 [9,] -14.24629 -131.680 [10,] -20.81758 -604.961 [11,] -15.32194 -18.735 To calculate the ranking
2010 Jul 19
5
par("uin") ?
I inherited a function written either for an older version of R or SPlus to draw a brace, "{", in a graph. It uses par("uin") to determine the scaling of the quarter circles that make up segments of the brace, but that setting doesn't exist in current R. I'm guessing that, in the function below, ux, uy can be defined from par("usr") and
2010 Dec 06
1
use pcls to solve least square fitting with constraints
Hi, I have a least square fitting problem with linear inequality constraints. pcls seems capable of solving it so I tried it, unfortunately, it is stuck with the following error: > M <- list() > M$y = Dmat[,1] > M$X = Cmat > M$Ain = as.matrix(Amat) > M$bin = rep(0, dim(Amat)[1]) > M$p=qr.solve(as.matrix(Cmat), Dmat[,1]) > M$w = rep(1, length(M$y)) > M$C = matrix(0,0,0)
2006 Mar 29
6
which function to use to do classification
Dear All, I have a data, suppose it is an N*M matrix data. All I want is to classify it into, let see, 3 classes. Which method(s) do you think is(are) appropriate for this purpose? Any reference will be welcome! Thanks! Best, Baoqiang Cao
2008 Apr 11
2
How to fill out some columns?
Dear R users, I'm working with 2 data sets which look like (for example) dx and dy in the next code: # Seed set.seed(4) # First data frame dx=matrix(rnorm(6*5),ncol=6) colnames(dx)=LETTERS[1:6] # Second data frame dy=matrix(rnorm(3*5),ncol=3) colnames(dy)=c('A','C','E') As you will notice, some columns in both data sets have the same names. At the end, what I need
2011 Aug 11
1
Splitting data
I want to implement the following algorithm in R: I want to split my data, use a t test to compare both means of the groups to see if they significantly differ from each other. If this is a yes (p < alpha) I want to split again (into 4 groups) and do the same procedure twice, and stop otherwise (here the problem arises). As a final result I would have different groups of data. I made some
2002 Mar 21
1
legend - bug with argument angle (PR#1404)
When legend() is used with the angle argument as follows, not only the boxes beside the legend text, but also the whole legend box is filled with shading lines. I think this is not intended: plot(1:10) legend(8, 4, c("A", "B"), angle=c(10, 80), fill=NULL, density=20) I'd suggest as a fix (legend.R of R-1.5.0): 25c25 < rect2 <- function(left, top, dx, dy,
2006 Apr 18
4
how to change legend size in a figure
Dear All, I am producing a figure with many curves on it. How do I make the legends for all those curves smaller so that it can fit the figure itself? The commands I used for ploting are: plot(x1,y1,col=1,lty=1) lines(x2,y2,col=2,lty=2) ... legend(0.3,0.4,c("name1","name2",...),col=1:20,lty=1:20) Any tips for making the legend fit the figure will very welcome! Thanks! Best,
2012 Oct 10
3
Generating random geographical coordinates
Dear all, I have two coordinates vectors, say X and Y of length n. I want to generate for each couple of coordinates X1,Y1 X2,Y2 X3,Y3....Xn,Yn a random coordinate which is located in a square define as X +/- dx and Y +/- dy. I saw the runif function which can generate for just one value at a time what I want : runif(1, X - dx, X + dx) for X and runif(1, Y - dy, Y + dy) for Y. I would like
2005 Dec 08
1
kronecker(... , make.dimnames=TRUE)
Hi I'm using kronecker() with a matrix and a vector. I'm interested in the column names that kronecker() returns: > a <- matrix(1:9,3,3) > rownames(a) <- letters[1:3] > colnames(a) <- LETTERS[1:3] > b <- c(x=1,y=2) > kronecker(a,b,make.dimnames=TRUE) A: B: C: a:x 1 4 7 a:y 2 8 14 b:x 2 5 8 b:y 4 10 16 c:x 3 6 9 c:y 6 12 18 > The
2005 Jul 22
2
about nnet package
Dear All, I'm learning to train a neural network with my training data by using nnet package, then evaluate it with a evaluation set. My problem here is that, I need the trained network to be used in future, so, what should I store? and How? Any other options other than nnet package? Any example will be highly appreciated! Best, Baoqiang Cao
2008 Feb 28
3
Collapse an array
Suppose I have a 4-D array X with dimensions (dx, dy, dz, dp). I want to collapse the first 3 dimensions of X to make a 2-D array Y with dimensions (dx*dy*dz, dp). Instead of awkward looping, what is a good way to do this? Is there a similar function like reshape in Matlab? Thanks, Gang
2005 Sep 15
2
about cutree
Hi Everyone, I'm trying to use cutree to get the clusters after hclust. What I used is: mycluster<-cutree(cnclust,h=0.5) Now, my problem is, how can I get the actual clusters? Thanks! Best, Baoqiang Cao
2012 Jul 29
1
Return od functions
Hi! I have some questions about R function. I try to write a function for multi-returns. The function code is as attachment. dgp.par<-function(ai, bi, t, n) { t0<-t+20 y0<-matrix(0, nr=t0, nc=n) y0[1,]<-ai/(1-bi) for(tt in 2:t0) { y0[tt,]<-ai+bi*y0[tt-1,]+rnorm(n, 0, 1) } y<-y0[21:t0,] x<-y0[20:t0-1,] z<-y0[19:t0-2,] z<-z[2:t,] dy<-y[2:t,]-y[1:t-1,]
2006 Nov 08
2
interprete wilcox.test results
Dear All, I am using wilcox.test to test two samples, data_a and data_b, earch sample has 3 replicates, suppose data_a and data_b are 20*3 matrix. Then I used the following to test the null hypothesis (they are from same distribution.): wilcox.test(x=data_a, y=data_b, alternative="g") I got pvalue = 1.90806170863311e-09. When I switched data_a and data_b by doing the following:
2000 Oct 06
4
R: plotting values on graphics
Everyone, I have an array of integer values which are located on a uniform 2-D grid. I want to plot the integer values at the node locations. The closest I have come is with the following code: for (i in 1:ny) { for (j in 1:nx) { ncell <- nx*(i - 1) + j ch <- as.character(ncount[ncell]) tx <- j*dx - dx/2 ty <- ny*dy - (i-1)*dy - dy/2 points(tx, ty, pch = ch, col =
2008 Dec 16
0
[LLVMdev] Another compiler shootout
On Tuesday 16 December 2008 01:03:36 Evan Cheng wrote: > FYI. http://leonardo-m.livejournal.com/73732.html > > If anyone is motivated, please file bugs for the losing cases. Also, > it might make sense to incorporate the tests into our nightly tester > test suite. FWIW, I just ported my ray tracer benchmark to C and found that llvm-gcc gives much worse performance than gcc on x86