i<-seq(1,length(rhino[,2])-1)

j<-seq(2,length(rhino[,2]),1)

Increase=c((Population[j]-Population

*)/Population*

*)*

Years<-c(Year[j]-YearYears<-c(Year[j]-Year

*)*

Years2<-c(0,Population[j]-1960) # Cumulative Years

R.est<-Increase/Years # Estimate "r"

R.av<-mean(R.est)

Rhi.mod <- nls(Population ~ No*exp(r*Years2),

start=list(No=2230, r=-0.1587006), data=rhino)

It all works up to the very last line where it says "Error in nls(Population ~ No * exp(r * Years2), start = list(No = 2230, : singular gradient"

Here is the data:

Year Population

1 1960 2230

2 1971 650

3 1976 500

4 1981 350

5 1983 70

6 1984 15

7 1991 30

8 1995 31

9 1998 25Years2<-c(0,Population[j]-1960) # Cumulative Years

R.est<-Increase/Years # Estimate "r"

R.av<-mean(R.est)

Rhi.mod <- nls(Population ~ No*exp(r*Years2),

start=list(No=2230, r=-0.1587006), data=rhino)

It all works up to the very last line where it says "Error in nls(Population ~ No * exp(r * Years2), start = list(No = 2230, : singular gradient"

Here is the data:

Year Population

1 1960 2230

2 1971 650

3 1976 500

4 1981 350

5 1983 70

6 1984 15

7 1991 30

8 1995 31

9 1998 25