```r
cor.test(d$y,d$x,method="spearman")
```

```
## 
## 	Spearman's rank correlation rho
## 
## data:  d$y and d$x
## S = 376, p-value = 0.0005407
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.7172932
```