search for: n3

Displaying 20 results from an estimated 273 matches for "n3".

Did you mean: n32
2002 Nov 26
4
[NB] lm problems
Hi, I have probably overlooked something obvious, but could anybody help me with following, please? Trying to make regression analysis. I have a huge dataframe with results from National Opinion Survey on Crime and Justice (www.abacon.com/fox/) with two variables G5 and N3 which are imported to R as ordered factors: > levels(noscj$G5) [1] "Strongly agree" "Agree" "Neither" [4] "Disagree" "Strongly disagree" > levels(noscj$N3) [1] "Serious problem" "Somewhat problem&q...
2020 May 05
2
"Earlyclobber" but for a subset of the inputs
...and > widen-op WN, you model exactly what you want. > > What am I missing? > we are using different opcodes for widen-op NN and widen-op WN. My understanding is that not setting earlyclobber to the W, N variant would allow the RegAlloc to do an allocation like this W1 = widen-op W2, N3 but this is not correct in that target because W1 and N3 are of different kind and W1 (being the group of registers N2, N3) overlaps N3. If I understand earlyclobber semantics correctly, earlyclobber would allocate the destination to something that doesn't overlap W2 and also doesn't over...
2017 Jun 06
2
integrating 2 lists and a data frame in R
> On Jun 6, 2017, at 4:01 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > > Hi Bogdan, > Kinda messy, but: > > N <- data.frame(N=c("n1","n2","n3","n4")) > M <- data.frame(M=c("m1","m2","m3","m4","m5")) > C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), I=c(100,300,400)) > MN<-as.data.frame(m...
2017 Jun 06
4
integrating 2 lists and a data frame in R
Dear Bert, thank you for your response. here it is the piece of R code : given 3 data frames below --- N <- data.frame(N=c("n1","n2","n3","n4")) M <- data.frame(M=c("m1","m2","m3","m4","m5")) C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), I=c(100,300,400)) how shall I integrate N, and M, an...
2017 Jun 06
0
integrating 2 lists and a data frame in R
Hi Bogdan, Kinda messy, but: N <- data.frame(N=c("n1","n2","n3","n4")) M <- data.frame(M=c("m1","m2","m3","m4","m5")) C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), I=c(100,300,400)) MN<-as.data.frame(matrix(NA,nrow=l...
2017 Jun 06
0
integrating 2 lists and a data frame in R
...at 7:44 AM, David Winsemius <dwinsemius at comcast.net> wrote: > > > On Jun 6, 2017, at 4:01 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > > > > Hi Bogdan, > > Kinda messy, but: > > > > N <- data.frame(N=c("n1","n2","n3","n4")) > > M <- data.frame(M=c("m1","m2","m3","m4","m5")) > > C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), > I=c(100,300,400)) > > MN...
2017 Jun 06
1
integrating 2 lists and a data frame in R
...emius at comcast.net> > wrote: > >> >> > On Jun 6, 2017, at 4:01 AM, Jim Lemon <drjimlemon at gmail.com> wrote: >> > >> > Hi Bogdan, >> > Kinda messy, but: >> > >> > N <- data.frame(N=c("n1","n2","n3","n4")) >> > M <- data.frame(M=c("m1","m2","m3","m4","m5")) >> > C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), >> I=c(100,300,400))...
2020 May 04
2
"Earlyclobber" but for a subset of the inputs
...ll, I'm working on a target whose registers have equal-sized subregisters and all of those subregisters can be named (or the other way round: registers can be grouped into super registers). So for instance we've got 16 registers W (as in wide) W0..W15 and 32 registers N (as in narrow) N0..N31. This way, W0 is made by grouping N0 and N1, W1 is N2 and N3, W2 is N4 and N5, ..., W15 is N30 and N31. The target has some widening instructions that take a number of N registers and output a W register. Possible combinations are Wdest = widen-op Nsrc1, Nsrc2 Wdest = widen-op Wsrc1, Nsrc2 The...
2010 Dec 29
2
How to create an array of lists of multiple components?
Hi, how can I create an array of lists of three components? This approach does not work: n1 <- 2 n2 <- 4 n3 <- 5 res <- array(rep(vector("list",3), n1*n2*n3), dim = c(n1,n2,n3)) res[1,1,1] # is not a list with three components... The goal is that res[1,1,1] is a list with three components. Also, appending the components didn't work. For example, I tried: component <- list(a = 4, b...
2012 Jun 04
1
simulation of modified bartlett's test
Hi, I run this code to get the power of the test for modified bartlett's test..but I'm not really sure that my coding is right.. #normal distribution unequal variance asim<-5000 pv<-rep(NA,asim) for(i in 1:asim) {print(i) set.seed(i) n1<-20 n2<-20 n3<-20 mu<-0 sd1<-sqrt(25) sd2<-sqrt(50) sd3<-sqrt(100) g1<-rnorm(n1,mu,sd1) g2<-rnorm(n2,mu,sd2) g3<-rnorm(n3,mu,sd3) x=c(g1,g2,g3) group=c(rep(1,n1),rep(2,n2),rep(3,n3)) N=60 k=3 v1=var(g1) v2=var(g2) v3=var(g3) #pooled variance A=((n1-1)*v1+(n2-1)*v2+(n3-1)*v3)/(N-k) #calcul...
2012 Jun 14
0
fixed trimmed mean for j-group
...a^2)/2)) x<-(exp(g*b)-1)/g*(exp((h*b^2)/2)) y<-(exp(g*c)-1)/g*(exp((h*c^2)/2)) z<-(exp(g*d)-1)/g*(exp((h*d^2)/2)) ######################## FIXED SYMMETRIC TRIMMED MEAN ############################### asim<-5000 pv<-rep(NA, asim) for(j in 1:asim) { print(j) set.seed(j) n1=15 n2=15 n3=15 n4=15 miu=0 sd1=1 sd2=1 sd3=1 sd4=1 a=rnorm(n1,miu,sd1) b=rnorm(n2,miu,sd2) c=rnorm(n3,miu,sd3) d=rnorm(n4,miu,sd4) ## data transformation g=0 h=0 w<-a*exp(h*a^2/2) x<-b*exp(h*b^2/2) y<-c*exp(h*c^2/2) z<-d*exp(h*d^2/2) mat1<-sort(w) mat2<-sort(x) mat3<-sort(y...
2017 Jun 06
1
integrating 2 lists and a data frame in R
Here's another approach: N <- data.frame(N=c("n1","n2","n3","n4")) M <- data.frame(M=c("m1","m2","m3","m4","m5")) C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), I=c(100,300,400)) # Rebuild the factors using M and N...
2013 Mar 10
1
misc3d Contour export to vtk
...rgl(ball) ### get the triangles allids <- rgl.ids() id <- allids$id[allids$type == "triangles"] filename="test.vtk" f <- file(filename, open = "w") start <- c("# vtk DataFile Version 3.0", "3D Plot data", "ASCII") n3 <- rgl.attrib.count(id, "vertices") verts <- rgl.attrib(id, "vertices") norms <- rgl.attrib(id, "normals") cols <- rgl.attrib(id, "colors") if (n3 %% 3 != 0) stop("verts not divisible by 3") n <- n3/3 start <- c(s...
2007 Apr 11
2
sem is not "taking" the model
...it runs, but it does not produce anything... Did I make a mistake somewhere in the model? (notice, TIME has only 1 indicator - t1, and I fixed t1's error variance at 0.414.) Thank you! model1 <- specify.model() NECESSITY -> n1, NA, 1 NECESSITY -> n2, lam_nec_2, NA NECESSITY -> n3, lam_nec_3, NA NECESSITY -> n4, lam_nec_4, NA FRUGALITY -> f1, NA, 1 FRUGALITY -> f2, lam_frug_2, NA FRUGALITY -> f3, lam_frug_3, NA TIME -> t1, NA, 1 n1 <-> n1, theta_n1, NA n2 <-> n2, theta_n2, NA n3 <-> n3, theta_n3, NA n4 <-> n4, theta...
2010 Jan 13
4
a question about deleting rows
I have a file like this: id n1 n2 n3 n4 n5 n6 1 3 4 7 8 10 2 2 4 1 2 4 3 10 3 7 0 0 0 0 8 4 10 1 0 0 2 3 5 11 1 0 0 0 5 what I want to do is: only if n2=0 and n3=0 and n4=0 and n5=0 then delete the row. how can...
2011 Sep 14
1
ruby to solve a physics question
I am trying to solve one of my graduate level physics problems with ruby... Here is what I have so far... a6=0.0 for n1 in -10..10 for n2 in -10..10 for n3 in -10..10 if n1!=0 and n2!=0 and n3!=0 p=Math.sqrt(n1**2+n2**2+n3**2+n1*n2/1.414+n1*n3/1.41+n2*n3/1.414) a6+=(1/p)**6 end end end end puts a6 What I''ve got here is a 10x10x10 face-centered cubic lattice of atoms. What I want to do is find this constant...
2010 Jul 05
2
Function to compute the multinomial beta function?
Dear R-users, Is there an R function to compute the multinomial beta function? That is, the normalizing constant that arises in a Dirichlet distribution. For example, with three parameters the beta function is Beta(n1,n2,n2) = Gamma(n1)*Gamma(n2)*Gamma(n3)/Gamma(n1+n2+n3) Thanks in advance for any assisstance. Regards, Greg [[alternative HTML version deleted]]
2012 Jul 07
0
fixed trimmed mean for group
.../g*(exp((h*d^2)__/2)) > > ##############FIXED SYMMETRIC TRIMMED MEAN############# > asim<-5000 > pv<-rep(NA, asim) > for(j in 1:asim) > { > print(j) > set.seed(j) > n1=15 > n2=15 > n3=15 > n4=15 > miu=0 > sd1=1 > sd2=1 > sd3=1 > sd4=1 > > a=rnorm(n1,miu,sd1) > b=rnorm(n2,miu,sd2) > c=rnorm(n3,miu,sd3) > d=rnorm(n4,miu,sd4) > > ## data transformation >...
2012 Feb 25
5
which is the fastest way to make data.frame out of a three-dimensional array?
foo <- rnorm(30*34*12) dim(foo) <- c(30, 34, 12) I want to make a data.frame out of this three-dimensional array. Each dimension will be a variabel (column) in the data.frame. I know how this can be done in a very slow way using for loops, like this: x <- rep(seq(from = 1, to = 30), 34) y <- as.vector(sapply(1:34, function(x) {rep(x, 30)})) month <- as.vector(sapply(1:12,
2011 Jul 27
3
Reorganize(stack data) a dataframe inducing names
Dear Contributors, thanks for collaboration. I am trying to reorganize data frame, that looks like this: n1.Index Date PX_LAST n2.Index Date.1 PX_LAST.1 n3.Index Date.2 PX_LAST.2 1 NA 04/02/07 1.34 NA 04/02/07 1.36 NA 04/02/07 1.33 2 NA 04/09/07 1.34 NA 04/09/07 1.36 NA 04/09/07 1.33 3 NA 04/16/07 1...