similar to: R for loop stops after 4 iterations

Displaying 20 results from an estimated 7000 matches similar to: "R for loop stops after 4 iterations"

2012 Sep 28
2
Converting array to matrix
Hi, I have a 3d array as below, I want to make this array to a matrix of p=50(rows) and n=20(columns) with the coverage values . The code before the array is: library(binom) Loading required package: lattice pi.seq<-seq(from = 0.01, to = 0.5, by = 0.01) no.seq<-seq(from = 5, to = 100, by = 5) cp.all = binom.coverage( p = pi.seq, n = no.seq , conf.level = 0.95, method = "exact")
2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values > dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2013 May 15
1
x and y lengths differ
I have a problem with R. I try to compute the confidence interval for my df. When I want to create the plot I have this problem: Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ. I try this code: library(dplR) df.rwi <- detrend(rwl = df, method = "Spline",nyrs=NULL) write.table(df.rwi,file="rwi.txt",quote=FALSE,row.names=TRUE)
2013 Mar 06
3
About basic logical operators
Hello everyone,           I have a basic question regarding logical operators. > x<-seq(-1,1,by=0.02) > x   [1] -1.00 -0.98 -0.96 -0.94 -0.92 -0.90 -0.88 -0.86 -0.84 -0.82 -0.80 -0.78  [13] -0.76 -0.74 -0.72 -0.70 -0.68 -0.66 -0.64 -0.62 -0.60 -0.58 -0.56 -0.54  [25] -0.52 -0.50 -0.48 -0.46 -0.44 -0.42 -0.40 -0.38 -0.36 -0.34 -0.32 -0.30  [37] -0.28 -0.26 -0.24 -0.22 -0.20 -0.18 -0.16
2013 May 23
1
sample(c(0, 1)...) vs. rbinom
Greetings.? My wife is teaching an introductory stat class at UC Davis.? The class emphasizes the use of simulations, rather than mathematics, to get insight into statistics, and R is the mandated tool.?? A student in the class recently inquired about different approaches to sampling from a binomial distribution.? I've appended some code that exhibits the idea, the gist of which is that using
2007 Apr 25
1
help
Hi all, I have 2 questions: 1)How do I calculate the mean on an imported txt file? I've imported the file below and that's what it looks like imported. How do I then calcuate the mean, median, or mode on the column LeafArea using the desktop R package? Any help would be greatly appreciated!! Thanks, Nat LeafType Leaflets LeafArea ShapeRatio LeafWeight LeafThickness 1 1
2010 Mar 31
1
Weird R behaviour?
Dear list, I have observed a weird behaviour from R --- apologies if I am missing something obvious! df3f826f28 df3f826f28 Say you type in R: >c.preec <- 10074 >c.gd <- 2200 >p1 <- .2 >c.neo <- p1*9451 + (1-p1)*3883 >n.preec <- 3710 >n.gd <- 2650 >n.neo <- 2120 >n.pcos <- 53000 >unit.met <- 94 >cost.met <- 94*n.pcos >effect <-
2008 Jun 05
1
choosing an appropriate linear model
I am trying to model the observed leaching of wood preservative chemicals from treated wood during an outdoor experiment where leaching is caused by rainfall events. For each rainfall event, the amount of rainfall was recorded as well as the amount of preservative chemical leached. A number of climatic variables were measured, but the most important is the amount of rainfall. I have tried a
2010 Jan 27
1
selecting significant predictors from ANOVA result
Dear all,   I did ANOVA for many response variables (Var1, Var2, ....Var75000), and i got the result of p-value like below. Now, I want to select those predictors, which have pvalue less than or equal to 0.05 for each response variable. For example, X1, X2, X3, X4, X5 and X6 in case of Var1, and similarly, X1, X2.......X5 in case of Var2, only X1 in case of Var3 and none of the predictors in case
2012 Oct 06
3
vector is not assigned correctly in for loop
Hi there, Here is a minimum working example: ---------------------------------------------------------------- lower = 0 upper = 1 n_bins = 50 interval = (upper - lower) / n_bins bins = vector(mode="numeric", length=n_bins) breaks = seq(from=lower + interval, to=upper, by=interval) for(idx in breaks) { bins[idx / interval] = idx } print(bins)
2011 Jan 21
4
clustering fuzzy
hello, i'm pete ,how can i order rows of matrix by max to min value? I have a matrix of membership degrees, with 82 (i) rows and K coloumns, K are clusters. I need first and second largest elements of the i-th row. for example 1 0.66 0.04 0.01 0.30 2 0.02 0.89 0.09 0.00 3 0.06 0.92 0.01 0.01 4 0.07 0.71 0.21 0.01 5 0.10 0.85 0.04 0.01 6 0.91 0.04 0.02 0.02 7 0.00 0.01 0.98 0.00 8 0.02
2008 Dec 06
1
Morlet wavelet not supportd by wavCWTPeaks
aa <- (structure(list(X.0.85 = c(-1.02, -1.17, -1.29, -1.39, -1.46, -1.5, -1.52, -1.5, -1.46, -1.39, -1.3, -1.19, -1.07, -0.93, -0.79, -0.65, -0.5, -0.36, -0.22, -0.08, 0.05, 0.18, 0.3, 0.41, 0.52, 0.62, 0.72, 0.81, 0.89, 0.98, 1.05, 1.13, 1.19, 1.25, 1.29, 1.31, 1.31, 1.29, 1.24, 1.16, 1.06, 0.93, 0.77, 0.58, 0.38, 0.16, -0.07, -0.31, -0.89, -1.05, -1.19, -1.31, -1.41, -1.47, -1.51, -1.51,
2012 Sep 27
1
Package ‘orcutt’ bug?
Hello~   Did any one have used the package 'orcutt' ?   I find that it can not work smoothly in a single variable regression. I use the example following, it function very well.   But when I regress "cons" on "price" (use the "reg1<-lm(cons~price+income+temp)") , then  use "reg11<-cochrane.orcutt(reg1) ". There is an error message “Error in
2016 May 25
1
Slow RAID Check/high %iowait during check after updgrade from CentOS 6.5 -> CentOS 7.2
On 2016-05-25 19:13, Kelly Lesperance wrote: > Hdparm didn?t get far: > > [root at r1k1 ~] # hdparm -tT /dev/sda > > /dev/sda: > Timing cached reads: Alarm clock > [root at r1k1 ~] # Hi Kelly, Try running 'iostat -xdmc 1'. Look for a single drive that has substantially greater await than ~10msec. If all the drives except one are taking 6-8msec, but one is very
2013 Dec 23
2
[PATCH net-next 3/3] net: auto-tune mergeable rx buffer size for improved performance
On Mon, Dec 16, 2013 at 04:16:29PM -0800, Michael Dalton wrote: > Commit 2613af0ed18a ("virtio_net: migrate mergeable rx buffers to page frag > allocators") changed the mergeable receive buffer size from PAGE_SIZE to > MTU-size, introducing a single-stream regression for benchmarks with large > average packet size. There is no single optimal buffer size for all >
2013 Dec 23
2
[PATCH net-next 3/3] net: auto-tune mergeable rx buffer size for improved performance
On Mon, Dec 16, 2013 at 04:16:29PM -0800, Michael Dalton wrote: > Commit 2613af0ed18a ("virtio_net: migrate mergeable rx buffers to page frag > allocators") changed the mergeable receive buffer size from PAGE_SIZE to > MTU-size, introducing a single-stream regression for benchmarks with large > average packet size. There is no single optimal buffer size for all >
2012 Jul 02
1
How to get prediction for a variable in WinBUGS?
Dear all,I am a new user of WinBUGS and need your help. After running the following code, I got parameters of beta0 through beta4 (stats, density), but I don't know how to get the prediction of the last value of h, the variable I set to NA and want to model it using the following code.Does anyone can given me a hint? Any advice would be greatly appreciated.Best
2008 Oct 05
1
plyr package: passing further arguments fail
Dear list and Hadley, The new plyr package seems to provide a clean and consistent way to apply a function on several arguments. However, I don't understand why the following example does not work like the standard mapply, library(plyr) df <- data.frame(a=1:10 , b=1:10) foo1 <- function(a, b, cc=0, d=0){ a + b + cc + d } mdply(df, foo1, cc=1) # fine mdply(df, foo1, d=1) #
2012 Mar 04
2
How do I create a scatterplot with two explanatory variables?
Hi there, I'm trying to make a scatterplot of removed versus duration for each type of bee. No matter what I try, I can't seem to get my code to work. Any help would be appreciated. Thanks! My r-code: dat$BEE <- with(dat, factor(BEE, c(1,2))) plot(REMOVED~DURATION,pch=BEE, col=BEE) REMOVED DURATION BEE 1 0.07 2 QUEEN 2 0.10 5 QUEEN 3 0.11 7 QUEEN 4 0.12 11 QUEEN 5 0.15 12 QUEEN 6 0.19
2008 Jun 12
3
Problem with rowMeans()
Hi all, I have a matrix called 'data', which looks like: > data[1:4,1:4] Probe_ID Gene_Symbol M1601 M1602 1 A_23_P105862 13CDNA73 -1.6 0.16 2 A_23_P76435 15E1.2 0.18 0.59 3 A_24_P402115 15E1.2 1.63 -0.62 4 A_32_P227764 15E1.2 -0.76 -0.42 > dim(data) [1]