I'm trying to simulate two random variables: One with a Normal Dist. and one with an Exp dist. I've run into issues as I cannot seem to find a good way to specify a different distribution for each variable. The column "row.names" is created everytime I run this, and I would like this not to happen. Also, the correlations at the end of the script are not what I was aiming for at the beginning. The code is rough (newish to R) so any advice would be appreciated.
m= matrix(c(1,.8,.8,1),nrow=2)
l=t(chol(m))
normal=matrix(rnorm(100,mean=10,sd=5),nrow=1,ncol=100)
exp=matrix(rexp(100,2), nrow=1,ncol=100)
data=rbind(normal,exp)
data2=t(as.data.frame(t(l)%*%data))
fix(data2)
cor(data2)
Thanks