similar to: Conditional Evaluation

Displaying 20 results from an estimated 7000 matches similar to: "Conditional Evaluation"

2010 Jan 29
3
Vector from Matrix
Dear Mailing List Members, the problem I've been grappling with für quite some time now is the following: I have a 100 rows x 200 columns matrix. data.set <- matrix(rnorm(20000, 100, 200)) Now I would like to get a vector of length 100 which collects the values from the following procedure: Take the sum of the minima of the two values from each row of columns 1 and 101, and divide it
2011 Sep 02
1
Maximum Likelihood using optim()
Dear mailing list, I would like to use the optim() command in order to maximize the logged likelihood of the following function, where p is the parameter of interest and should be constrained between 0 and positive infinity. y = 1/2 * ((te - x)/(te - tc))^p x and y are given by x <- c(5.18, 6.28, 7.00, 7.08, 7.54, 7.90, 8.24, 8.64, 12.17, 12.89, 14.27, 15.38, 15.80, 16.46, 20.41, 21.27,
2012 Apr 08
0
new version of QCA
Dear All, I have just uploaded a new version of the QCA (Qualitative Comparative Analysis) on CRAN, and it will be propagated in a couple of days. This is version 1.0-0 ("Easter edition") of the package, straight from the previous version 0.6-5, and it represent a major re-write of the package in order to accomodate fuzzy-sets. I am pleased to welcome Alrik Thiem as a co-author of this
2012 Apr 08
0
new version of QCA
Dear All, I have just uploaded a new version of the QCA (Qualitative Comparative Analysis) on CRAN, and it will be propagated in a couple of days. This is version 1.0-0 ("Easter edition") of the package, straight from the previous version 0.6-5, and it represent a major re-write of the package in order to accomodate fuzzy-sets. I am pleased to welcome Alrik Thiem as a co-author of this
2010 Jul 19
3
Reshaping data
Dear All, I have some data in the following shape: ID begin_t1 end_t1 begin_t2 end_t2 Thomas 11/03/04 13/05/06 04/02/07 16/05/08 ... ... ... ... ... Jens 24/01/02 23/05/03 07/06/03 14/11/05 I would like to reshape this data to have the following form: ID Begin_Time End_Time Thomas 11/03/04 13/05/06 Thomas 04/02/07 16/05/08 ... ... ... Jens 24/01/02 23/05/03 Jens
2010 Mar 23
2
Transform data set
Dear R Experts, I am having some trouble creating a variable in R. I have data on self-placement of voters, their placement of parties, and which party they feel closest to. The data is structured like this: Party_Close lrplaceself lrplaceParty1 lrplaceParty2 ... party1 2 4 5 party2 5 6 4 party1 6 2 1 etc... I want to format the data set so it looks like this: Party_Close
2007 Oct 19
2
Name length of function argument? (PR#10357)
Hi, I've just been programming a function to calculate the likelihood in a probit model. The function looks like this likelihood <- function(Y,X,p) { Z <- p[1] +p[2]*X P <- Y*pnorm(Z) + (1-Y)*(1-pnorm(Z)) -prod(P) } out <- optim(likelihood,p=c(0,0),Y=wells$switch,X=wells$dist, hessian=TRUE) X and Y are vectors containing column data. This works fine, however, if I rename p to
2010 Apr 23
3
Event History Data Recoding
Dear R list, I have an event history data set that is structured like this: Legislative act Discussion Agreement Time Event Act1 2006-05-30 2006-06-19 20 1 Act2 2004-03-01 2004-06-14 105 1 . . . I have information on the meetings in the legislature between adoption periods in a separate variable (the
2007 Feb 09
1
AoTuV branch
when will be merged the vorbis-aotuv branch into the reference library of vorbis? I feel that the development of vorbis is almost null if the aotuv don't exist... it will be nice to have the reference library using the last tunings as soon as posible... I gess it will be 1.1.3? or there are other surprises that can make it 1.2.0? __________________________________________________ Correo
2012 Jul 31
0
QCA version 1.0-4 released
Dear All, QCA package version 1.0-4 has been released today, the sources are now visible on CRAN and the binaries for Windows and MacOS should appear in a couple of more days. We highly recommend upgrading to this version. Apart from a number of small bug fixes, the most notable reason to upgrade is a dramatic increase in speed, due to the compilation of some computationally intensive parts of
2012 Jul 31
0
QCA version 1.0-4 released
Dear All, QCA package version 1.0-4 has been released today, the sources are now visible on CRAN and the binaries for Windows and MacOS should appear in a couple of more days. We highly recommend upgrading to this version. Apart from a number of small bug fixes, the most notable reason to upgrade is a dramatic increase in speed, due to the compilation of some computationally intensive parts of
2008 Jul 31
0
Is conditional evaluation of R code chunks possible in Sweave ?
Hi R mailing list Does anyone know of a good way to conditionally evaluate R code chunks when Sweaveing? What I'd kind of like to be able to do is set a number of variables in a list and if variable.a=TRUE then process code chunk labelled "methodA", if variable.b=TRUE then process code chunk labelled "methodB" etc <<label=setvars>>= variable.a <- TRUE
2001 Jun 06
1
conditional evaluation with ";"?
Is this a bug: assume "XYZ" is a non existing object: > XYZ Error: Object "XYZ" not found then: > XYZ;ls() Error: Object "XYZ" not found > ls() is not evaluated ("XYZ;XYZ" don't give two errors) I'm quiete unsure if this is intended help(";") returns "No documentation" peter Version: platform =
2003 Sep 25
1
multiple plot layout and filled contour
Hello everybody, Could anybody give me a hint how I can use "layout" and "filled.contour" (or "image" plot with a color legend) together, please? What I want to do is something like the following example (Two or more plots with a legend for each at one page): data(volcano) layout(matrix(1:2, 1, 2, byrow = TRUE)) for (i in 1:2) { filled.contour(i*volcano, color =
2004 Jan 05
1
slow and max connection errors
Sorry about not being specific enough. I will try and be more so in the future. Here is what I have currently: Apple X-serve running Yellowdog (a Redhat 9 port for ppc) with 1GB of RAM, 3 60GB HD not setup as RAID. They are individual partitions (/var and /, /home and /shared). The shared partition is strictly for Samba file sharing. I build in a matching user in both the system and in
2013 Oct 11
3
matrix values linked to vector index
Hi, In the example you showed: m1<- matrix(0,length(vec),max(vec)) 1*!upper.tri(m1) #or ?m1[!upper.tri(m1)] <-? rep(rep(1,length(vec)),vec) #But, in a case like below, perhaps: vec1<- c(3,4,5) ?m2<- matrix(0,length(vec1),max(vec1)) ?indx <- cbind(rep(seq_along(vec1),vec1),unlist(tapply(vec1,list(vec1),FUN=seq),use.names=FALSE)) m2[indx]<- 1 ?m2 #???? [,1] [,2] [,3] [,4] [,5]
2007 Oct 18
2
Run-time error '429'
Hello, I'm running wine on my Lenovo X60s under Ubuntu 7.04 I received a small program-executable made somehow with Matlab. A simple flow simulation model. Installation and executing the file with wine seems to be unproblematic first. However, there are some functions in the program where it crashes with the following message: Run-time error '429' ActiveX component can't create
2010 Oct 01
2
element wise conditional assignment in r
Hi, I am looking for a one-liner code for the following situation say I have a vector r of 0 and 1's, and another vector v of equal length. I want to assign v[i]-1 to v[i] if r[i]=1, for all i. How would I do that using mapply or any other batch processing keywords? thanks. John -- View this message in context:
2013 Apr 18
1
select and do some calculations/manipulations on certain rows based on conditions in R
Hi, May be this helps (Assuming that there are only '0's and '1's in the dataset) dat1<-read.table(text=" ??????? ID X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 1?? 5184??? 0??? 0??? 0??? 0??? 0?? 0?? 0??? 0??? 0??? 1???? 0????? 0????? 0????? 0????? 0????? 0 2?? 6884??? 0??? 0??? 1??? 0??? 0?? 1?? 0??? 0??? 0??? 0???? 0????? 0????? 0????? 0????? 0????? 0 3?
2008 Jun 11
4
Matrix transformation problem
ng, I have a matrix (x) with binary content. Each row of the matrix holds exactly one 1, and the rest of the row is zeros. The thing is that I need to 'collapse' the matrix to one column where each row holds the original column index of the 1's (y). Sometimes, the matrix is quite large, so I have a perfomance problem. x <- matrix(c(1,0,0, 0,0,1, 0,1,0, 0,0,1, 0,1,0,