Dear R list-members, Is there any way to display numbers with comma as decimal separator, i.e., "5,4" instead of "5.4", in plots (x and y axis, expressions)? Thanks for any suggestion, Antonio Olinto ----------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi> Is there any way to display numbers with comma as decimal > separator, i.e., "5,4" instead of "5.4", in plots (x and y > axis, expressions)?You could try something with axis() and chartr(), like ... par(mfrow=c(2,1)) plot(1:10/11, rep(1, 10), main="Standard X-Axis") plot(1:10/11, rep(1, 10), main="Customised X-Axis", axes=F) axis(1, at=pretty(1:10/11), labels=chartr(".", ",", as.character(pretty(1:10/11)))) axis(2) box() Hope that helps Paul -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Help!
I'm desperate! I don't understand why my function won't work!
Its for a simple simulation exercise: robin hood fires an arrow
at a target with 50cm radius, and his aim follows a centered
normal distribution with a standard deviation of 40cm (on x and
y axis, independently). Here he takes 10 shots and is awarded
points if he hits close to the center.
For some reason, this function always returns a score of 870?!?!
I'm probably missing something really quite obvious but I just
can't figure out what it is.
thanks for your help (you guys are great!),
Yannick.
function(){
score_0
x_rnorm(10, mean=0, sd=40)
y_rnorm(10, mean=0, sd=40)
d_sqrt(x^2 + y^2)
for(i in 1:10) {
if (d[i] > 50) print("d?sol?\n")
if (40 < d[i] < 50) score_sum(score,2)
if (25 < d[i] < 40) score_sum(score,5)
if (15 < d[i] < 25) score_sum(score,10)
if ( 5 < d[i] < 15) score_sum(score,20)
if ( 0 < d[i] < 5) score_sum(score,50)
}
print(d)
print(score)
}
------------------------------------
yannick.wurm at insa-lyon.fr
http://homepage.mac.com/yannickwurm/
tel: 06.16.41.71.92 icq: 22044361
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._