Changes between Initial Version and Version 1 of R Code


Ignore:
Timestamp:
Apr 4, 2011 11:17:20 AM (14 years ago)
Author:
celine
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • R Code

    v1 v1  
     1back to first page[..][[BR]] 
     2 
     3 * Distribution conjointe (histogramme et corrélation entre deux variables) 
     4http://freakonometrics.blog.free.fr/index.php?tag/R 
     5{{{ 
     6library(evd); data(lossalae)  
     7x <- lossalae$Loss; y <- lossalae$ALAE 
     8xhist <- hist(log(x), plot=FALSE)   
     9yhist <- hist(log(y), plot=FALSE) 
     10top <- max(c(xhist$counts, yhist$counts))  
     11nf <- layout(matrix(c(2,0,1,3),2,2,byrow=TRUE),  
     12c(3,1), c(1,3), TRUE)  
     13par(mar=c(3,3,1,1))  
     14plot(x, y, xlab="", ylab="",log="xy",col="red")  
     15par(mar=c(0,3,1,1)) 
     16barplot(xhist$counts, axes=FALSE, ylim=c(0, top),  
     17space=0,col="light green")  
     18par(mar=c(3,0,1,1)) 
     19barplot(yhist$counts, axes=FALSE, xlim=c(0, top),  
     20space=0, horiz=TRUE,col="light blue") 
     21}}} 
     22