library(wle)
data(cavendish)
result <- wle.normal(cavendish)
result
result <- wle.normal(cavendish,boot=20,num.sol=1)
barplot(result$weights,col=2,xlab="Observations",
ylab="Weights",ylim=c(0,1),
names.arg=seq(1:length(result$weights)))
Run the code above in your browser using DataLab