similar to: Repeating

Displaying 20 results from an estimated 500 matches similar to: "Repeating"

2012 Apr 05
4
Appropriate method for sharing data across functions
In trying to streamline various optimization functions, I would like to have a scratch pad of working data that is shared across a number of functions. These can be called from different levels within some wrapper functions for maximum likelihood and other such computations. I'm sure there are other applications that could benefit from this. Below are two approaches. One uses the <<-
2003 May 08
3
Avoiding loops to spare time and memory
Is it possible to avoid the loop in the following function (or make the function otherwise more efficient) and can someone point me to a possible solution? (It would be great if hours could be reduced to seconds :-). # --------------------------------------------- RanEigen=function(items=x,cases=y,sample=z) { X=matrix(rnorm(cases*items),nrow=cases,byrow=F) S=crossprod(X-rep(1,cases) %*%
2003 Jun 03
3
Update VR_7.1-6
The update of VR by downloading VR_7.1-6.zip and using install.packages (from local zip files) fails with the following error message: Error in file(file, "r") : unable to open connection In addition: Warning message: cannot open file `VR/DESCRIPTION' Other packages can be installed without problems, except of dse_2003.4-1 with a similar error message. Why? Operating System:
2003 May 21
1
help on spatial data
Hi, I have a dataset with x and y coordinates and in each point I have an identity of point, in some cases I can have more then one identity by point. My dataset is something like this: > x <- rep(c(1:4),4) > y <- rep(c(1:4),c(4,4,4,4)) > area1 <- sample(factor(rep(c("a","b","c","d"),4))) > area2 <-
2012 Jun 09
2
Reshaping columns
Dear all, I have a data frame with 2 columns and 102500 rows. The data looks like below V1 V2 8098 110000....... 9099 001100....... 0023 110011....... 6545 111111....... . . . . . . . . . . I want to split the colums like this ; V1 V2 V3 V4 V5 V6 v7 8098 1 1 0 0 0 0 ...... 9099
2003 Sep 21
1
Zero inflated count models
Can someone show me how to specify zero inflated poisson and zero inflated negative poisson models in R? I would like to replicate the example given in Long (1997: Regression Models for Categorical and Limited Dependent Variables) in Chapter 8.5 (pp. 242-247). TIA Dirk ************************************************* Dr. Dirk Enzmann Criminological Research Institute of Lower Saxony
2002 Mar 28
2
Is it possible to do Ripley's K and L functions analysis with R?
Dear friends, I am studying the spatial distribution of trees in a tropical swamp forest in Brazil, and the spatial association between the trees and other forest and non forest elements. These are point pattern analysis of mapped data, preferentially done with the L function of Ripley. I have recently discovererd the R-project and would like to know whether it is possible to do these
2005 Jun 13
1
ppinit
Probably a simple question, but I can't find the answer to it ... In the 'ppinit' code it describes how it takes a 'file in standard format' and creates a point process object with it. Can anyone enlighten me as to what this 'standard format' is? The example given doesn't allow me to view the '.dat' file that apparently is in this format. Thanks, Suzie
2009 Feb 27
1
levelplot help needed
Hi there, I'm looking for someone who can give me some hints how to make a nice levelplot. As an example, I have the following code: # create some example data # -------------------------------------- xl <- 4 yl <- 10 my.data <- sapply(1:xl, FUN = function(x) { rnorm( yl, mean = x) }) x_label <- rep(c("X Label 1", "X Label 2", "X Label 3", "X
2013 Oct 17
0
Singular Matrix 'a' in solve
Hi, I have a set of matrix data named “invest” consists of 450 observations (75 countries, 6 years) with 7 variables (set as I, pop, inv, gov, c, life, d; which each is “numeric[450]”). The procedure is modify from code provided by B.E. Hansen at http://www.ssc.wisc.edu/~bhansen/progs/ecnmt_00.html. *Then the variable is being transformed to* y <- lag_v(i,0) cf <-
2012 Mar 25
2
avoiding for loops
I have data that looks like this: > df1 group id 1 red A 2 red B 3 red C 4 blue D 5 blue E 6 blue F I want a list of the groups containing vectors with the ids. I am avoiding subset(), as it is only recommended for interactive use. Here's what I have so far: df1 <- data.frame(group=c("red", "red", "red", "blue",
2001 Sep 10
1
data format for ppinit
After installation of R into VineLinux2.1.5, I started to enjoy statistics following some instruction, and found it very useful. One of my main purpose to use R is to try spatial statistics. Since library named "spatial" has already installed, I just tried ... > library(spatial) > towns <- ppinit(test.dat) ------- test.dat ------- x,y 4,7 5,7 5,8 5,9 6,7 6,8 6,9 7,8
2009 May 22
2
Scope problem?
I've just spent today trying to fix a Heisenbug... this function returns a linear interpolator function: interpOne <- function(xl,yl){ f = function(data){ t = (data-min(xl))/(max(xl)-min(xl)) return(min(yl)+t*(max(yl)-min(yl))) } return(f) } > k=interpOne(c(0,1),c(4,5)) > k(0.5) [1] 4.5 and this function uses the above to return a function that returns a piece-wise
1998 Mar 25
1
R-beta: errors in R help docs
The online help in R has errors concerning mai and mar. mai: A numerical vector of the form `c(xb, xt, yl, yr)' which gives the margin size specified in inches. mar: A numerical vector of the form `c(xb, xt, yl, yr)' which gives the lines of margin to be specified on the four sides of the plot. The default is `c(5,4, 4, 2) + 0.1'. This would be bad if it were true, since it
1998 Mar 25
1
R-beta: errors in R help docs
The online help in R has errors concerning mai and mar. mai: A numerical vector of the form `c(xb, xt, yl, yr)' which gives the margin size specified in inches. mar: A numerical vector of the form `c(xb, xt, yl, yr)' which gives the lines of margin to be specified on the four sides of the plot. The default is `c(5,4, 4, 2) + 0.1'. This would be bad if it were true, since it
2002 Apr 19
1
FW: Problem compiling on HP-UX 10.20
Here is a copy of the last few lines in base-Ex.Rout.fail: > x <- seq(3,500);yl <- c(-.3, .2) > plot(x,x, ylim = yl, ylab="",type='n', main = "Bessel Functions Y_nu(x)") > for(nu in nus){xx <- x[x > .6*nu]; lines(xx,besselY(xx,nu=nu), col = nu+2)} > legend(300,-.08, leg=paste("nu=",nus), col = nus+2, lwd=1) > > x <-
2006 May 17
4
uniform and clumped point plots
I am trying to generate two dimensional random coordinates. For randomly distributed data I have simply used >xy<-cbind(runif(100),runif(100)) However I also want to generate coordinates that are more uniformly distributed, and coordinates that are more contagiously distributed than the above. Can anyone make any suggestions Thanks. Dr Terry Beutel Rangeland Scientist Animal
2007 Jun 29
4
asterisk call unique id in dialplan
Hi how can i retrieve the call unique id of asterisk in the dialplan? I have enabled the cdr logging on a postgres database. In the table cdr each record has a field that assumes an unique id (for example: 1141628669.51) Can i retrieve this from the dialplan? For example: exten => 203,1,Answer exten => 203,2,Set(CALLERID(name)=UNIQUE_ID - ${var_name_unique_id}) exten =>
2009 Mar 23
1
using xyplot
Dear R-sians! I am trying generate a bunch of xyplots library(lattice) myPanel <- function(x,y,xl=range(x),yl=range(y),...) { panel.xyplot(x,y, pch=20,col='blue',cex=0.7,xlim=xl,ylim=yl,...) panel.abline(v=0, col='gray30',lty=2,lwd=1.5,...) panel.loess(x,y, span=2/3,family='gaussian',normalize=T,col='red',lwd=1.5,...) #
2007 Jul 13
2
trouble compiling Hmisc package
Hi: We're trying to install the Hmisc package on a Solaris 9 machine. Here's what we get: R CMD INSTALL /usr/local/srctree/Hmisc_3.4-2.tar.gz * Installing to library '/usr/local/lib/R/library' * Installing *source* package 'Hmisc' ... ** libs g95 -fPIC -g -O2 -c cidxcn.f -o cidxcn.o g95 -fPIC -g -O2 -c cidxcp.f -o cidxcp.o g95 -fPIC -g -O2 -c hoeffd.f -o