Skip to content
Prev 360824 / 398506 Next

very long processing time

Hi Shashi,
First off, keep the thread on the list. Compare the two statements below:

Jim:  If this method is revealed to us, we may be able to help you.

Shashi: "if this method reveal to me i can help"

Regardless, I will attempt to help. This looks like number 2 - inefficient
code

You appear to be forming a very large vector bit by bit. This is _very_
inefficient. If you want to get the data frame "matrixdata" as a vector:

# this may work
fitness_1_data<-unlist(matrixdata)
# if not, try this
fitness_1_data<-as.vector(as.matrix(matrixdata))

This is written to a file and the file is read and again reformatted into
vectors for processing. If you are able, try to create a _small_ data set
that will be processed in the same way as "matrixdata" (e.g. a 10x10 data
frame):

smalldata<-as.data.frame(matrix(sample(1:100,100,nrow=10))
names(smalldata)<-paste("Col",1:10,sep="")

This will allow you to try out your code without spending a day on each
run. For instance, you can probably substitute:

matrixdata2<-matrixdata[,-1]

for a lot of the code in the second half of your script.

Jim

On Wed, May 11, 2016 at 10:16 AM, SHASHI SETH <sethshashi at rediffmail.com>
wrote:

  
  
Message-ID: <CA+8X3fUG3OCw8TSs05kXtJE22UP+g34Euupagj0HsPpFpE+Ayw@mail.gmail.com>
In-Reply-To: <1462918759.S.4696.27197.f5-224-103.1462925771.8927@webmail.rediffmail.com>