ERROR: <R...> Can not open file: /var/www/mediawiki/Rfiles/SH772b29fed0519cf5d9e1bfe12bc99d295e11a95b.R in

#START
in.updated<-FALSE
library(nnet)
set.seed(42) 
# get input data
in.pre <- matrix(c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16))
in.obs <- matrix(c(2,2.5,4,6.5,10,14.5,20,26.5,34,42.5,52,62.5,74,86.5,100,114.5,130))
target.pre <- matrix(c(3.5, 6, 10))

# generate indices of data to use for training (use every other value - bit weak, but hey...)
samp<-sample(1:nrow(in.pre),round(nrow(in.pre)/2,2))
# extract data subsets
training.pre <- in.pre[samp,]
training.obs <- in.obs[samp,]
test.pre <- in.pre[-samp,]
test.pre <- in.pre[-samp,]

# now generate the network using the training data
nn = nnet(training.pre,training.obs,size=1,linout=TRUE,maxit=300) 
cat ("NEURAL NETWORK TRAINING:\n")
cat ("Observed and predicted values:\n")
cat(sprintf("x\t\t y (obs)\t\t y (fit)\n"))
cat(sprintf("%6.2f\t %6.2f\t %6.2f\n",training.pre, training.obs,nn$fitted.values))

# now generate a fit using the training data - assuming it follows the same function...
training.fit<-predict(nn, training.pre, type="raw", na.action = na.omit)

#training.cor<-round(cor(training.fit,training.obs),2)
#cat("correlation coefficient for training data and results using neural network:",training.cor,"\n") 

# finally generate the observations corresponding to the target observations
target.obs = predict(nn,target.pre,type = "raw", na.action = na.omit) 
cat ("NEURAL NETWORK OUTPUT:\n")
cat ("Predicted values:\n")
cat(sprintf("x = %6.2f, y = %6.2f\n", target.pre, target.obs))
in.updated<-TRUE
#END

#