search for: gcheer3

Displaying 15 results from an estimated 15 matches for "gcheer3".

Did you mean: cheers
2010 Jul 23
4
how to calculate the product of every two elements in two vectors
Thanks in advance! A=c(1, 2,3) B=c (9, 10, 11, 12) I want to get C=c(1*9, 1*10, 1*11, 1*12, ....., 3*9, 3*10, 3*11, 3*12)? C is still a vector with 12 elements Is there a way to do that? -- View this message in context: http://r.789695.n4.nabble.com/how-to-calculate-the-product-of-every-two-elements-in-two-vectors-tp2300299p2300299.html Sent from the R help mailing list archive at Nabble.com.
2009 Nov 20
3
symbol in the plot
a graph question. Thanks a lot in advance. I made two scatterplots on one graph (sigma vs. delta1, sigma vs. delta2) (20 observations of delta1, delta2 and corresponding sigma) the x-axis is sigma, the y-axis is either delta1 or delta2. I connected both scatterplots. To seperate them, one curves is a line with circles, the other curve is a line with squares on it. I want to make a notation
2009 Oct 03
1
if else statement error
Hello, I am doing a if else statement in R. But it always comes out error such as 'unexpected symbol' There are two variables. ini and b. when ini=1, a=3; when ini>1 and b>2, a=3; all other situations, a=6. I don't know where it is wrong. Here is my code ini=3 b=4 if (ini==1) { a=3 } else if (ini>1 and b>2 ) { a=3 } else {a=6} Thanks a
2010 Jan 04
3
how to draw abline correctly?
Hello, I am frastruated with this graph, just cannot get what I need. Thank you for any suggestions or help. I really appreciate it. I wrote the following code, but there are 3 problems 1, the red line is added on the graph but without any marker on the y-axis. I want to display the number '.1361' on the y-axis. So people can easily tell 'method 2' gets a constant estimate, which
2009 Nov 23
0
R-help Digest, Vol 81, Issue 23
...CHARD M. HEIBERGER) > 70. Re: how to tell if its better to standardize your data matrix > first when you do principal (hadley wickham) > 71. Re: mac os X: mprobit fails to install (Marc Schwartz) > 72. how to generate balanced sample from two normal distribution > (gcheer3) > 73. Re: mac os X: mprobit fails to install (SL) > 74. Re: how do i persuade IT to install R on PCs ?? ...and should > I ?? (stephen's mailinglist account) > 75. Re: contour(): lines & labels in different colours? > (David Winsemius) > 76. Re: contour...
2009 Oct 04
2
is that possible to graph 4 dimention plot
Suppose there are 4 variables d is a function of a , b and c I want to know how a, b and c change will make d change It will be straightforward to see it if we can graph the d surface if d is only a function of a and b, I can use 'persp' to see the surface of d. I can easily see at what values of a and b, d will get the maxium or minium or multiple modes, etc But for 4 dimention graph,
2009 Nov 22
1
how to generate balanced sample from two normal distribution
Good afternoon, I have a question on generating simple randomization data. Thanks for any suggestions. Two normal distribution N(0,1) and N(1,1) A: I want to generate 20 data, 10 from N(0,1) and 10 from (1,1). each observation's indicator (either is from N(0,1) or N(1,1) ) is randomized. I need use the frist 10 data from the generated 20 dataset. (it is not necessary 5 from N(0,1) and 5
2009 Dec 04
2
how to seperate a matrix
Hello, I am working on seperate the matrix to two matrices but got trouble on doing it. Please give me some suggestions on doing this. Thanks a looooooooooooot! My original matrix m is as follows for example, [,1] [,2] [,3] [1,] 6 8 1 [2,] 5 9 2 [3,] 20 10 3 [4,] 7 11 4 [5,] 8 12 5 [6,] 25 13 6 [7,] 14 14 7 I want to generate two
2009 Dec 02
2
calculation problem when export and import data
Hello, I have a question on export and import data. Thank you for any suggestions. data 'simul' is generated as follows: N <- 20 n <- N/2 nsets <- 10 simul <- matrix(0,nsets,N) th <- c(0,1, 1) for(i in 1:nsets){ simul[i,] <- rnorm(N,mean= rep(th[1:2],N/2),sd=th[3]) } I exported data as follows: write.table(simul,
2010 Jul 26
1
After writing data in MMF using SEXP structure, can i reference in R?
...ction (Vipul Agarwal) 40. Re: Equivalent to go-to statement (Gabor Grothendieck) ---------------------------------------------------------------------- Message: 1 Date: Sat, 24 Jul 2010 03:02:47 -0700 From: Dennis Murphy <[5]djmuser at gmail.com> To: aegea <[6]gcheer3 at gmail.com> Cc: [7]r-help at r-project.org Subject: Re: [R] how to calculate the product of every two elements in two vectors Message-ID: <AANLkTinUJjoCiG47ptPq5Eo_fXYZXuQbUzB=+[8]KLCO6QX at mail.gmail.com> Content-Type: text/plain as.vector(t(outer(A,...
2010 Feb 18
3
Can R make an usual dotplot
Dear R experts, Can R make an usual dotplot just like Minitab and other softwares? I have the following data, and can use dotchart to graph a dotplot: y=c(2.873438152e-01, -8.732895642e-01, 4.579001889e-01, 1.047395204e+00, 8.491182299e-02 , -1.938007105e+00, -1.273708343e+00, 9.848010588e-05, 7.238490734e-01, -1.490552717e+00) dotchart(y, xlab="10 observations from
2009 Dec 04
1
how to calculate covariance matrix in R? why cov doesn't work
Hello, Sorry. It may be a stupid question. I have two vectors a<-c(9,3,5) b<-c(3,4,1) How can I get the variance-covariance matrix of these two vectors? I tried cov(a,b), I got a number not a matrix. I tried to transpose vector a and b as t(a) and t(b), it still cannot work. Any suggestions? Thank a lot! -- View this message in context:
2010 Sep 17
1
How to denote a line on the graph
Please give me some help, many thanks. I graphed a expected CDF line of a binomial distribution on a graph, And I have some observed points (observed CDF) from 4 groups fall on the smooth CDF line. I cannot really get the legend I want legend ('topleft', c('a, 'b', 'c', 'd', 'expected CDF'), col=c(1,2,3,4), pch=c(0,1,2, 3, '' ),
2009 Oct 03
3
else if statement error
Hello, I am doing a simple if else statement in R. But it always comes out error such as 'unexpected error' There are two variables. ini and b. when ini=1, a=3; when ini>1 and b>2, a=5; all other situations, a=6. I don't know where it is wrong. Here is my code ini=3 b=4 if (ini==1) { a=3 } else if (ini>1 and b>2 ) { a=5 } else {a=6} Thanks a
2010 Feb 01
1
how to generate data set with different length and calculate the mean?
Hello, This may be a rare question. I am struggling to solve it. I really appreciate any help or suggestions. Thanks a lot in advance! I put my questions between the code to make it clear. The problem I have is: I generated 10 data sets with 8 data for each set. Now I want to change the number of data in each dataset according to a vector 'size' (as follows), that is, each new dataset