[R] plot of computed vector
gReetings: I apologize for the non-programming language. I found what seems to be a strange behavior of plot(). The code follows: #_ N=3030; gn=.04; tn=1:100 n=N/(1+(N-1)*exp(-gn*tn)) N=n*(1-exp(-gn*tn))/(1-n*exp(-gn*tn)) plot(N) #strange plot N N=rep(3030, 100) plot(N) #behaves as expected Windows XP, R 2.4.0. or 2.4.1 Thanks, -- Mihai Nica Jackson State University 112 Channing Cir. Canton, MS 39046 601-914-0361 The least of learning is done in the classrooms. - Thomas Merton [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch 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.
Re: [R] plot of computed vector
I apologize for the non-programming language. I found what seems to be a strange behavior of plot(). The code follows: #_ N=3030; gn=.04; tn=1:100 n=N/(1+(N-1)*exp(-gn*tn)) N=n*(1-exp(-gn*tn))/(1-n*exp(-gn*tn)) plot(N) #strange plot N Have a look at diff(N) to see what's going on. The default axis labels and printing display too few decimal places to see the differences between the numbers. Hadley __ R-help@stat.math.ethz.ch 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.
Re: [R] plot of computed vector
Wow. I understand, thanks. m Mihai Nica 170 East Griffith St. G5 Jackson, MS 39201 601-914-0361 - Original Message From: hadley wickham [EMAIL PROTECTED] To: Mihai Nica [EMAIL PROTECTED] Cc: R list r-help@stat.math.ethz.ch Sent: Sunday, March 25, 2007 7:53:14 AM Subject: Re: [R] plot of computed vector I apologize for the non-programming language. I found what seems to be a strange behavior of plot(). The code follows: #_ N=3030; gn=.04; tn=1:100 n=N/(1+(N-1)*exp(-gn*tn)) N=n*(1-exp(-gn*tn))/(1-n*exp(-gn*tn)) plot(N) #strange plot N Have a look at diff(N) to see what's going on. The default axis labels and printing display too few decimal places to see the differences between the numbers. Hadley __ R-help@stat.math.ethz.ch 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. Food fight? Enjoy some healthy debate [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch 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.