Skip to content
Prev 263208 / 398502 Next

Unreasonable syntax error

On Tue, 21 Jun 2011, james198877 wrote:
I don't see 'r' at all.  It doesn't recognise s.

You have strange (16-bit?) characters in your .r file.

Note in your output:
 NdeTirage<-1  # NdeTirage d?signe le nombre de tirages
+   s<- array(0,c(4,8,N));
+   for( k in 1:N){
+      s[1,3,k]<- (0.1) * runif(1)+ 0.1; 
+      s[1,1,k]<- (0.02) *  runif(1)+ 0.98 ?C s[1,3,k];
                                                             ^^
Error in s[1, 5, k] <- (0.04) * runif(1) + 0.04 : object 's' not found

The "?C"  (which I guess is a 'dash' rather than a 'minus') is not recognised, and seems 
to 'complete' the function definition (the "+'s stop appearing in column 1), but s is only 
defined inside the function.
Why use Word for a text file when Notepad would do the job (better)?

Ray Brownrigg