search for: ind

Displaying 20 results from an estimated 1524 matches for "ind".

Did you mean: and
2012 Nov 17
2
problem with "any" function
Dear R users, I have the "any" function of R  any(ind.c, ind.r, ind.sgn) all are logical factors  it works fine when any of three is true but when they are combined it doesnt work. i tried this any(ind.c, ind.r, ind.sgn,((ind.c==TRUE) & (ind.r==TRUE)), ((ind.c==TRUE) & (ind.sgn==TRUE)),((ind.r==TRUE) & (ind.sgn==TRUE)),  ((ind.c==TRUE)...
2008 Mar 28
1
Beginner help with retrieving frequency and transforming a matrix
Hi All, Just hoping some one can give me a hand with a problem... I have a dataframe (DF) with about 5 million entries that looks something like the following: >DF ID Cl Co Brd Ind A AB AB 1 S-3 IND A BR_F BR_F01 1 0 0 2 S-3 IND A BR_F BR_F01 1 0 0 3 S-3 IND A BR_F BR_F01 1 0 0 4 S-3 IND A BR_F BR_F01 1 0 0 5 S-3 IND A BR_F BR_F01 1 0 0 6 S-3 IND A BR_F BR_F01 0 1 0 7 S-3 IND A BR_F BR_F02 0 0 1 8 S-3 IND A BR_F BR_F02 0 1 0 9 S-3 IND...
2011 Jan 11
0
modified FAST Script from package SensoMineR for the R community - Reg
...also decluttered of overlapping labels, however before calling the fastmod function a source or call to ##plot.MFA2 and plot.MCA2 is required. ## library(maptools) need to be called before calling the functions. ###plot.MFA2 Function plot.MFA2<- function (x, axes = c(1, 2), choix = "ind", ellipse = NULL, ellipse.par = NULL, lab.grpe = TRUE, lab.var = TRUE, lab.ind.moy = TRUE, lab.par = FALSE, habillage = "ind", col.hab = NULL, invisible = NULL, partial = NULL, lim.cos2.var = 0, chrono = FALSE, xlim = NULL, ylim = NULL, cex = 1, title = NULL, pal...
2001 Nov 28
1
Reading output from "debugfs -R stat <8>"
...oup: 0 Size: 104857600 File ACL: 0 Directory ACL: 0 Links: 1 Blockcount: 205016 Fragment: Address: 0 Number: 0 Size: 0 ctime: 0x3c0442fd -- Tue Nov 27 17:50:53 2001 atime: 0x00000000 -- Wed Dec 31 16:00:00 1969 mtime: 0x3c0442fd -- Tue Nov 27 17:50:53 2001 BLOCKS: (0-11):506-517, (IND):518, (12-1035):519-1542, (DIND):1543, (IND):1544, (1036-2059):1545-2568, (IND):2569, (2060-3083):2570-3593, (IND):3594, (3084-4107):3595-4618, (IND):4619, (4108-5131):4620-5643, (IND):5644, (5132-6155):5645-6668, (IND):6669, (6156-7179):6670-7693, (IND):7694, (7180-8203):7695-8718, (IND):8719, (82...
2004 Jun 18
2
Barplots and error indicators: Some R-Code
I' ve seen that several people are looking for a function that creates a barplot with an error indicators (I was one of them myself). Maybe you will find the following code helpful (There are some examples how to use it at the end): # Creates a barplot. #bar.plot() needs a datavector for the height of bars and a error #indicator for the interval #many of the usual R parameters can be set: e....
2007 Jul 10
1
Get journal position
Hi, There is any way to figure out where physically is the journal on a ext3 fs and it's size? Thanks! Jordi
2011 Apr 29
3
why doesn't ifelse work ?
I have the following lines of code: ind <- rollapply(GSPC, 200, mean) signal <- ifelse(diff(ind, 5) > 0 , 1 , -1) signal[is.na(signal)] <- 0 I never get a value of -1 for signal even though I know diff(ind , 5) is less than zero frequently. It looks like when diff(ind , 5) is less than zero, signal gets set to 0 instead of -...
2006 Jun 03
2
Busy Signals after hangup
I've not seen an answer to this in any forum. I make a call through Asterisk, with a VOIP phone, doesn't matter which. The call gets made, I leave a voicemail, or complete the call in some manner, and the other side hangs up. I hear a busy signal on the phone on my end. If I have an extension that looks like this, after the hangup() is executed, my phone gives busy signals until I
2009 Aug 27
5
Help on efficiency/vectorization
...rownames(x) <- letters[1:dim(x)[1]] > x V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 a 0 1 1 1 0 0 0 0 1 0 b 1 1 1 1 0 1 0 0 1 1 c 0 1 1 0 0 0 0 0 0 1 d 1 0 0 1 1 1 1 1 0 0 e 1 0 0 0 0 1 1 0 1 0 V1.ind <- rownames(x)[x[,"V1"]==1] V2.ind <- rownames(x)[x[,"V2"]==1] V3.ind <- rownames(x)[x[,"V3"]==1] V4.ind <- rownames(x)[x[,"V4"]==1] : : V10.ind <- rownames(x)[x[,"V10"]==1] > V1.ind [1] "b" "d" "e" &...
2006 May 26
2
combinatorial programming problem
Hola! I am programming a class (S3) "symarray" for storing the results of functions symmetric in its k arguments. Intended use is for association indices for more than two variables, for instance coresistivity against antibiotics. There is one programming problem I haven't solved, making an inverse of the index function indx() --- se code below. It could for instance return the original k indexes in strictly increasing order, to make indx...
2010 Feb 02
1
ggplot/time series with indicators question
...lt;- data.frame( id = c(rep('111',12),rep('222',12),rep('333',12)), week=c(timescale,timescale,timescale), value=c(rnorm(12,15,3),rnorm(12,30,5),rnorm(12,20,5)) ) p <- ggplot(data.all, aes(x=week, y=value, group=id, colour=id)) + geom_line(size=1.05) #adding indicators on each line data.all$ind <- c(rep("",4),rep("2",2),rep("",4),rep("3",2),rep("",2),rep("2",4),rep("",3),rep("6",3),rep("",8),rep("1",4)) ind.uniq = setdiff(unique(data.all$ind),c("&qu...
2012 Aug 03
5
replacement has length zero. In addition: Warning message: In max(i) : no non-missing arguments to max; returning -Inf
...9999, 9999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 12.7, 12.5, 12.3, 12.6, 12.6, 12.5, 12.5, 12.5, 12.7, 12.7, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99), class = c("xts", "zoo"), .indexCLASS = c("POSIXct", "POSIXt"), .indexTZ = "", tclass = c("POSIXct", "POSIXt"), tzone = "", index = structure(c(1217564520, 1217566320, 1217568120, 1217569980, 1217571720, 1217573520, 1217575320, 1217577120, 1217578920, 1217580720), tzone...
2011 Feb 25
1
help please ..simple question regarding output the p-value inside a function and lm
...mbers and R experts I am stuck at a point and I tried with my colleagues and did not get it out. Sorry, I need your help. Here my data (just created to show the example): # generating a dataset just to show how my dataset look like, here I have x variables # x1 .........to X1000 plus ind and y ind <- c(1:100) y <- rnorm(100, 10,2) set.seed(201) P <- vector() dataf1 <- as.data.frame(matrix(rep(NA, 100000), nrow=100)) dataf <- data.frame (dataf1, ind,y) names(dataf) <- (c(paste("x",1:1000, sep=""),"ind", "y")) for(i i...
2005 Apr 19
2
indexing an array using an index-array, but one entry being ', '
Hi I have the following array: test <- array(c(1:16), dim = c(3,4,3)) test ## I call some enries using an index array test.ind <- array(rbind(c(1,2,1), c(3,3,2)), dim = c(2,3)) test[test.ind] ## suppose I want all values in the 2nd row and 4th col over ## all three 3rd dimensions test[2,4,] how to specify a test.ind array with the last index left with ',' i.e test.ind should be evaluated as &...
2009 Feb 23
1
Slow indexing access for Matrix
Consider the following little "benchmark" > require(Matrix) > tmp <- Matrix(c(rep(1,1000),rep(0,9000)),ncol=1) > ind <- sample(1:10000,10000) > system.time(tmp[ind,]) user system elapsed 0.004 0.001 0.005 > ind <- sample(1:1000,10000,replace=TRUE) > system.time(tmp[ind,]) user system elapsed 0.654 0.006 0.703 > system.time(Matrix(as(tmp,"matrix")[ind,]))...
2009 Jun 17
2
Re gression by groups questions
...to go about it. Hope someone can help. # The code below creates a data.frame comprising two marginally noisy straight lines and performs a # regression on each based on the grp factor. This is a single variable case based on R wiki one liner. # y = x for grp A # y = 2 + 5x for grp B set.seed(5) ind <- as.vector(runif(50)) d1 <- data.frame(x=ind, y=ind + rnorm(50,0,0.1), grp=rep("A", 50)) d2 <- data.frame(x=ind, y=2+5*ind+rnorm(50,0,0.1), grp=rep("B", 50)) data1 <- rbind(d1,d2) fits <- lm(y ~ grp:x + grp - 1, data=data1) summary(fits) with(data1, plot(x,y)) a...
2007 Jul 13
2
Suggestion to extend aggregate() to return multiple and/or named values
...r way to set up the 'temp' data frame than to call aggregate and remove the final column), but I'm suggesting that something similar to this may be profitably used to replace aggregate entirely. #modified aggregate command, allowing for multiple/named output values agg=function(z,Ind,FUN,...){ FUN.out=by(z,Ind,FUN,...) num.cells=length(FUN.out) num.dv=length(FUN.out[[1]]) temp=aggregate(z,Ind,length) #dummy data frame temp=temp[,c(1:(length(temp)-1))] #remove last column from dummy frame for(i in 1:num.dv){ temp=cbind(temp,NA) n=names(FUN.out[[1]])[i] names(tem...
2018 Feb 28
1
Missed opportunity in the midend, unsigned comparison
Hi everybody, I see a missed optimization opportunity in LLVM that GCC catches and I'd love to hear community's input. Here's the original C code: 1 char arr[2]; 2 char *get(unsigned ind) { 3 if (ind >= 1) { 4 return 0; 5 } 6 return &(arr[ind]); 7 } The variable `ind` is unsigned so, based on the comparison, if it is not greater or equals to one, than it is must be equal to zero. GCC understands that `ind` equals to zero at line 6 and generates something lik...
2011 Mar 27
6
Asking Favor For the Script of Median Filter
Hello,everybody. My name is Chuan Zun Liang. I come from Malaysia. I am just a beginner for R. Kindly to ask favor about median filter. The problem I facing as below: > x<-matrix(sample(1:30,25),5,5) > x [,1] [,2] [,3] [,4] [,5] [1,] 7 8 30 29 13 [2,] 4 6 12 5 9 [3,] 25 3 22 14 24 [4,] 2 15 26 23 19 [5,] 28 18 10 11 20 Thi...
2006 Jul 03
2
help a newbie with a loop
...m)*sp2/sx)) repeat { n1<-ceiling((((qt(1-(a/2),n0-4)+qt(1-b,n0-4))/b1)^2)*(((m+1)/m)*sp2/sx)) if(n0==n1) break n0<-n1 } return(c(sx,n1)) } x<-rnorm(1000,0,1) x<-x[order(x)] res<-matrix(0,1000,2) #use the function and plot for different values of ind and p for ( p in c(0.05,0.10,0.15,0.20,0.25,0.30,0.40,0.50)) { risk<-p*(2-p) nonrisk<-(1-p)^2 m<-nonrisk/risk for (ind in 1:500) {res[ind,]<-powerb(x[c(1:(500-ind),(500+ind):1000)],4,0.05,0.20,0.1,m)} plot(res[,1],res[,2],type="p",ylab="n",xlab="var(x)&qu...