Displaying 3 results from an estimated 3 matches for "distval".
Did you mean:
distal
2004 Feb 26
1
Distance and Aggregate Data - Again...
...sum(pop), sum(dwell),
mean(age). I don't know how to write only those fields out to the
file.
Any suggestions?
Thank you for your help,
Danny
#####
library(fields)
d <- as.matrix( read.csv("filein.csv") )
for(i in 1:nrow(d)){
lonlat1 <- d[i,2:3]
lonlat2 <- d[,2:3]
distval <- d[,1] [which(rdist.earth( t( as.matrix(lonlat1) ),
as.matrix(lonlat2), miles=F ) < 2)]
write(distval,file="C:\\outfile.out",ncol=1, append=TRUE)
}
#####
--------------
Sample Input Data
--------------
recid,lat,long,pop,dwell,age
10010265,47.5971174,-52.7039227,584,219,38
1001...
2008 Mar 22
1
Vectorization Problem
I have the code for the bivariate Gaussian copula. It is written with
for-loops, it works, but I wonder if there is a way to vectorize the
function.
I don't see how outer() can be used in this case, but maybe one can
use mapply() or Vectorize() in some way? Could anyone help me, please?
## Density of Gauss Copula
rho <- 0.5 #corr
R <- rbind(c(1,rho),c(rho,1)) #vcov matrix
id <-
2012 Mar 19
2
hypergeometric function in ‘ mvtnorm’
Is there any way to know how the "dmvt" function computes the hypergeometric
function needed in the calculation for the density of multivariate t
distribution?
--
View this message in context: http://r.789695.n4.nabble.com/hypergeometric-function-in-mvtnorm-tp4483730p4483730.html
Sent from the R help mailing list archive at Nabble.com.