similar to: alternative way to loop

Displaying 20 results from an estimated 10000 matches similar to: "alternative way to loop"

2007 Sep 16
2
stalled loop
Hi, The loop I wrote executes correctly but is stalled seriously. Is there a way to hasten execution without coming up with a brand new algorithm ? please help. Thanks. -- View this message in context: http://www.nabble.com/stalled-loop-tf4451301.html#a12699524 Sent from the R help mailing list archive at Nabble.com.
2007 Sep 15
2
naming columns of data frame
Hey, I am trying to make a data frame and the name of a column is composed of a number, a dot, and a word, such as "1.whatever". But I always get this error message:"syntax error, unexpected SYMBOL, expecting ',' in:" while printing data frame out . When I rename the column with purely letter, everything works fine. Some suggestion about the cause/ solution ?? Thanks.
2009 Aug 03
2
combine venn diagram and pie chart
Hi R users, I am wondering if it there is any R's function helping integrate venn diagram and pie chart to compare two related datasets. I know the package limma(bioconductor) has something built-in for making venn diagram, but I guess it would be very painful to use line and text to specify the proportions in the fashion of pie chart . Thanks in advance, Kevin Chang -- View this
2009 Feb 26
1
layout of igraph
Dear R users, I am trying to draw a network using igraph package. I intend to place the hub nodes (the ones with the relatively more connection with other nodes) in the center of the graph. Also, the graph need to be in the fashion that the higher the correlation between two nodes is , the closer the two nodes will be. Is there any layout that can help or any other way to do this? Thanks in
2009 Mar 03
1
save the layout using igraph
Hi R users, I am using built-in functions in igraph package to draw networks . I need to compare several network with exactly the same structure but with edge hightlighted differently. I am wondering if there is a way to save the layout so that every graph will look the same as each other except for the colors of edges. Or is there any parameter I can set for this purpose?? Thanks in advance,
2007 Oct 29
2
flops calculation
Hi all, Since proc.time return three different kind of times (user, system and elapsed) , I am wondering which one is right for calculating flops. In New S Language (Becker et. al. ) , it seems to be the user because " the user time measures the processor time used in S and the system time measures the operating system in response to S's request". But in R Help , system time
2007 Sep 13
1
rearrange problem
Hi All, I am trying to rearrange alphabetically each element in a character vector. ex: say the first element in the vector is "cba", and my goal is to turn it into "abc". The suggested function to use is sort(). But it turns out that sort doesn't work at the level of element. So I am wondering that if there is an alternative function for this purpose. Please help me out .
2009 Jul 20
1
locate substring in the string it belong to
Hi R users, I am trying generate the indices for locating a in the string it come from. Given the length of the string, it will take too long using the combn() for further comparison. I am wondering if R has any built-in function for this purpose. To make it concrete: this.substring="cc" this.string="ccc" start.location=1,2 end.location=2,3 Thanks in advance, Kevin
2007 Dec 11
2
Alternative to For Loop?
Hi, I am doing a calculation on a long series using a For Loop. Here is an example of the calculation: accumulate=function(x){ y=0 z=0 for(i in 1:length(x)){ y=y+x[i] z=c(z,y) } return(z[2:length(z)]) } > x=c(1:10) > x [1] 1 2 3 4 5 6 7 8 9 10 > accumulate(x) [1] 1 3 6 10 15 21 28 36 45 55 > Although the For Loop works, looping through an array is time
1998 Feb 27
1
R-beta: is there a way to get rid of loop?
Here is a programming question. The code I am using is quite slow and I was wondering if there is a way to get rid of the for loop. I am dealing with "interaction" in 2x2 table, and am using Edwards's G_I (Likelihood, p. 194). I label the cells in the table as follows stim response "y" "n" total -------------------------------- y hit miss nsignal
2008 Aug 27
1
conversion of data structure between R and Perl
Dear R users, I am trying to call a Perl subroutine from R . The subroutine returns an arrray contaning three elements wihch are all strings. But the calling in R return an integer which is 0. I have no idea how this could happen. Maybe becasue I shouldn't use system() in R or I should load a particular package for my R in windows. Please help ....
2007 Oct 03
1
inverse of matrix made by low.tri function
Hi all, I am using R trying to get a inverse matrix of (X^T)X , but I keep getting the error message like: no b argument and no default value for sprintf(gettext(fmt, domain = domain), ...) . -------------------------------------------------------------------------------------------- # my code X<-Matrix(rep(1,500),100,5) X[lower.tri(X)]<-1-10^-7 XtX<- t(X)%*% X XtXu<-lu(XtX)
2007 Oct 27
1
Newton method iteration problem
Hi all, I am coding for finding the root of f(x)= phi(x) -alpha where phi(x) is the cumulative density function and alpha is constant . The problem right now is I can't get the "initialX" representing the root out of the while loop when ending , it seems to me it disappear when the loop ends accroding to the error message. I need help . Please suggest the cause or solution to this
2008 Mar 31
1
APPLY as alternate to FOR loop?
Dear list, Below I've written a clunky for loop that counts NA's in a row, replacing all with NA if there are more than 3 missing values, or keeping the values if 4 or more are present. This is sample code from a very large dataframe I'm trying to clean up. I know there are many simpler more elegant solutions to this little problem. Would someone be willing to show me how to
2008 Dec 03
3
alternative way to replicate()
Dear all, I'm looking for an alternative way to replicate the "2," string for an x number of times, and end up with one string containing "2," x times. I can partly achieve this using replicate(). > y <- rep("2,", times=3) > y [1] "2," "2," "2," The output that I am looking for is, however, "2,2,2,". I also tried
2003 Sep 21
0
Alternative way for changing passwords
Hi This is not directly related to samba but may be useful to administrators. We developed this server for linux to allow users to change their passwords using a https capable web browser. The source code and aditional info are available at: http://linuxconsulting.planetaclix.pt/soft/passwdd.html For support and comments please don't send to samba mailing lists.
2012 Jul 02
2
[LLVMdev] Alternative of Loop::getTripCount?
I found out that Loop::getTripCount method is obsolete in LLVM 3.1 Is there an alternative? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120702/ea6ca4e6/attachment.html>
2012 Jul 03
0
[LLVMdev] Alternative of Loop::getTripCount?
Hi Taemin, On 03/07/2012 01:53, Taemin Kim wrote: > I found out that Loop::getTripCount method is obsolete in LLVM 3.1 > Is there an alternative? I use getSmallConstantTripCount() to get loop trip counts using the ScalarEvolution analysis pass. See include/llvm/Analysis/ScalarEvolution.h for a detailed explanation. Ivan > > > _______________________________________________
2002 Oct 02
0
Alternative to slow double for() loop
Dear List Many thanks to those who helped me yesterday regarding possible ways to increase memory size in R. I have found the inefficient part of my program to be a double for() loop, and was wondering if anybody could suggest an alternative to using this double loop which would speed things up. The program looks like this: for (j in 1:m) { for (i in 1:n) {
2009 Jul 23
2
alternative to rbind within a loop
Hi, I often have to do this: select a folder (directory) containing a few hundred data files in csv format (up to 1000 files, in fact) open each file, transform some character variables in date-tiime format make into a dataframe (involves getting rid of a few variables I don't need concatenate to the master dataframe that will eventually contain the data from all the files in the