Hi, I have a bug and I don't find it. Can u help me please. In attachement : - My script file : CPU_study.txt - My data sample file : a.txt When I use it, the error message is :> source("H:/R/_workspace/CPU_study_1.R")Erreur dans "[<-"(`*tmp*`, i, k, value = numeric(0)) : rien ? remplacer (= error in ... nothing to replace) I try a lot of thing but it doesn't work. The probleme is line 39 : val <- (val + t[(((i*step)-step)+j),k]) Thanks Guillaume LAURENS - trainee student Simulation Industry - EYYSIDV Airbus France This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.
On 5/26/2006 8:45 AM, LAURENS, Guillaume wrote:> Hi, > > I have a bug and I don't find it. Can u help me please. > > In attachement : > - My script file : CPU_study.txt > - My data sample file : a.txt > > When I use it, the error message is : >> source("H:/R/_workspace/CPU_study_1.R") > Erreur dans "[<-"(`*tmp*`, i, k, value = numeric(0)) : rien ? remplacer > (= error in ... nothing to replace) > > I try a lot of thing but it doesn't work. > The probleme is line 39 : > val <- (val + t[(((i*step)-step)+j),k])The error says that your indexing returned a zero length vector. I'd suggest printing out the values of "(((i*step)-step)+j)" and "k" just before this line (or using the debugger to examine them). They probably aren't in the range you were expecting. Duncan Murdoch
LAURENS, Guillaume a ?crit :> Hi, > > I have a bug and I don't find it. Can u help me please. > > In attachement : > - My script file : CPU_study.txt > - My data sample file : a.txt > > When I use it, the error message is : >> source("H:/R/_workspace/CPU_study_1.R") > Erreur dans "[<-"(`*tmp*`, i, k, value = numeric(0)) : rien ? remplacer > (= error in ... nothing to replace) > > I try a lot of thing but it doesn't work. > The probleme is line 39 : > val <- (val + t[(((i*step)-step)+j),k]) >Have you try the "debug" library ? With the function mtrace() you can follow the work step by step and in the same time with the function bp() you can add break points... Etienne> Thanks > > Guillaume LAURENS - trainee student > Simulation Industry - EYYSIDV > Airbus France > > > This e-mail is intended only for the above addressee. It may contain > privileged information. If you are not the addressee you must not copy, > distribute, disclose or use any of the information in it. If you have > received it in error please delete it and immediately notify the sender. > Security Notice: all e-mail, sent to or from this address, may be > accessed by someone other than the recipient, for system management and > security reasons. This access is controlled under Regulation of > Investigatory Powers Act 2000, Lawful Business Practises. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > > >--