We would need to at least see 10 lines either side of the error to understand its context. Also take a look with you editor (hex editor would be handy) to see if there is some unprintable character around it. Can you isolate just that portion of the code? Try putting it inside a function to see if it will at least be read in without a syntax error. This is where you start learning to debug your program by executing pieces at a time, or in your case, at least "compiling" the section of code by trying to source it in with a function to see what happens. You might have an unbalanced quote in your script.
On Mon, Sep 6, 2010 at 4:42 PM, Amit Patel <amitrh...@yahoo.co.uk> wrote: > Hi > > I have got a long script which will not run for me as i keep getting errors : > >> source("clusterfixV1_4.r") > Error in source("clusterfixV1_4.r") : > clusterfixV1_4.r: unexpected symbol at > 158: eck[k,2] <- as.numeric(1) > 159: #ClusterInfo[k,2] <- "Clustered > > I have sorted all the ones i can but i am having a problem here > Can anyone tell me the cause of these problems. Its not a very short or > straightforward script so i dont expect you to go through the whole thing but > it > would be great if you can give me an indication as to what I may be doing > wrong. > I havent attached the data that the script uses because I'm pretty sure the > principles i have used are right > when running the script i get the above error on line 158 and 159 > I am more than happy to provide further information(e.g the dataset) if it > helps > > Many thanks in advance > > Amit Patel > > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.