[R] Plotting in R
Yudi Pawitan
yudi at stat.ucc.ie
Thu May 11 10:48:49 CEST 2000
>Here is a question that I don't know if it is possible to do in R:
>
>If I type:
>> log(1:1000)
>
>Then, I want to "take out" the first decimal place of each output, plot
>them based on their appearence frequencies. Then take the second
>decimal place, do the same thing.
Try:
a_ log(1:1000)
d1_floor(10*(a-floor(a))) # first decimal
par(mfrow=c(2,2))
hist(d1,breaks=c(-1:9))
table(d1)
d2_floor(10*(10*a-floor(10*a))) # second decimal
hist(d2,breaks=c(-1:9))
table(d2)
>
>Actually, I suspect I don't have to write a function to do this. Is it
>possible to do this? Get the first decimal place of each answer to
>log(1:1000), then plot them?
>
>Thanks
>
>--
>---------------------------------------------------------------------------
--------
>
> Ko-Kang Wang
> Undergraduate Student
> Computer Science/Statistics Double Major
> University of Auckland
> Auckland 1005
> New Zealand
>---------------------------------------------------------------------------
--------
>
>
>
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
.-.-
>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
>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
._._
>
Yudi Pawitan yudi at stat.ucc.ie
Department of Statistics UCC
Cork, Ireland
Ph 353-21-490 2906
Fax 353-21-427 1040
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list