search for: tdon

Displaying 3 results from an estimated 3 matches for "tdon".

Did you mean: don
2006 May 17
0
script S-plus -> R
Dear List, I'm trying to transfer a script that uses S-plus functions for the kernel and integration calculations to R. This it what it looks like in S-plus: qrm(cpt,don,ect,h,intctk,nbcol,nbl1,nbl2,nbl3,nlc,nlgn,overlap,Results,tdon,tdon1,tdon11,tdon2,tdon21) don<-guiDisplayFileDialog() import.data (DataFrame="tdon",FileName=don,FileType="EXCEL") nbcol<-length(tdon[1,]) nlc<-matrix(0,1,nbcol) for (i in 1:nbcol) {nbl1<-tdon[,i] nbl2<-nbl1[nbl1!="NA"] nbl3<-numRows(nbl2) nlc[,i]&l...
2006 Jul 11
0
script problem to obtain pairs of overlap values
...ata frame. With S sampled species (columns) in my data frame, I want obtain S(S-1)/2 pairs of overlap values between species. However, the code is not well write at all (only an overlap value is produced) and I can't find the solution. To illustrate the calculations, I use the data frame "tdon" and the value of the bandwidth "h", which was estimated in other part of script. tdon <- data.frame (sp.1=c (5 ,9 ,NA ,5, 11) , sp.2=c (4, 2, 4, NA, 11, ),sp.3=c(5, 4, 2, 6, 13), sp.4=c(3 , 11, NA, 5, 3), sp.5=c(2 ,5 ,2, 9, 9)) > h [1] 1.047 2.973 0.887 1.520 2.955 Here...
2006 Jun 02
1
doubt with integrate ()
...the "integrate" function. Searching in the r-help archives, I think this may have something to do with the function (it is not returning a vector but a number), but I don't see exactly what. The function to integrate was defined with a for loop first: for (i in 1:(nbcol-1)) {tdon1<-tdon[,i] tdon11<-subset(tdon1,tdon1!="NA") fctk1<-function(x) {density(tdon11, bandwidth=h[i], kernel="gaussian")$y} for (j in (i+1):nbcol) {tdon2<-tdon[,j] tdon21<-subset(tdon2,tdon2!="NA") fctk2<-function(x) {densi...