similar to: help using tapply

Displaying 20 results from an estimated 1000 matches similar to: "help using tapply"

2007 Jul 14
1
return() in nested functions
Dear WizaRds, After consulting different sources I am still unable to understand the correct use of return() in nested functions. To illustrate the problem: f <- function(x,y,type){ est1<-function(x,y){ z=x+y out(x,y,z)} est2<-function(x,y){ z=x*y out(x,y,z)} out<-function(x,y,z) return(x,y,z) if (type=="est1") est1(x,y) if (type=="est2") est2(x,y) }
2007 Mar 03
3
Help with paste()
Dear r-helpers, Could you please tell me what's missing: rbind(paste('txt.est',1:24, sep = '')) txt.est1, ... txt.est24 are vectors that I wish to rbind. _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 Parcels: Room 102 Gilmer Hall McCormick Road
2010 Sep 22
2
speeding up regressions using ddply
Hi, I have a data set that I'd like to run logistic regressions on, using ddply to speed up the computation of many models with different combinations of variables. I would like to run regressions on every unique two-variable combination in a portion of my data set, but I can't quite figure out how to do using ddply. The data set looks like this, with "status" as
2015 Apr 28
2
Resumen diseño sencillo
Estimado Carlos Ortega Muchas gracias, al ver su correo recordé por donde estaba eso muy fácil, copio y pego la solución, era tan fácil que no lo recordaba. > table(d) , , Etablecimiento = Est1 Factor Dieta A B 1 220 0 2 0 120 3 0 0 4 0 0 , , Etablecimiento = Est2 Factor Dieta A B 1 0 0 2 0 0 3 0 120 4 0 118
2007 Feb 27
0
Optimizing the loop for large data
Rusers: I am trying to apply a quadratic discriminant function to find the best classification outcomes. 1 is assigned to the values greater than a threshold value; and 0 otherwise. I would like to see how the apparent error rates and the optimal error rate change with increasing threshold values. I have a 1000*10 data matrix: n=1000 and p=10. Here is what I wrote so far, but seems to be
2012 Nov 16
3
dovecot: lda(root): Fatal: Invalid user settings. Refer to server log for more information.
I ran dovecot -a and the blizzard of data seemed ok to my limited knowledge. Is there another log I should look into to trace this error down? Dovecot and system info: thufir at dur:~$ thufir at dur:~$ dovecot --version 2.0.19 thufir at dur:~$ thufir at dur:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.1
2009 Aug 07
3
Simple Question: adding points to a boxplot
I apologize in advance for the simplicity of this question. I use R 2-3 times a year, and I seem to forget more in the intervening months than I learn during my days of panicked reading.... I HAVE tried looking at the help resources; I'm just not very good at understanding them. I have a dataframe with 18 observations of 5 different things, and a second dataframe with and estimate for those
2008 Nov 30
1
panic: spin lock held too long on 7.1-PRERELEASE (sio)
Hi, I currently encounter spin lock 0xc0c83ba8 (sio) held by 0xc6337460 (tid 100005) too long panic: spin lock held too long cpuid=3 on hp server with two dual-core intel xeon (3.8GHz) and 3GB RAM. System is 7.1-PRELEASE last fetched 29.11.2008, 17:58 UTC. This happens with VSCom Card that was previously in use in a 5.3-STABLE system (also hp server, but older hardware) without problems. The
2007 Dec 28
1
logistic mixed effects models with lmer
I have a question about some strange results I get when using lmer to build a logistic mixed effects model. I have a data set of about 30k points, and I'm trying to do backwards selection to reduce the number of fixed effects in my model. I've got 3 crossed random effects and about 20 or so fixed effects. At a certain point, I get a model (m17) where the fixed effects are like this
2013 Dec 24
1
dovecot-postfix stack imap_client_workarounds
To use dovecot-postfix stack with thunderbird, do I put the configuration into /usr/share/dovecot/protocols.d/impad.protocol? That would seem to be how the stack is configured. "Thunderbird To use with Thunderbird, edit the file /etc/dovecot/dovecot.conf: protocol imap { ... login_greeting_capability = yes imap_client_workarounds = tb-extra-mailbox-sep }"
1999 May 31
0
setting passwords from Windows
I'd like to change Samba passwords from win95 and NT4 clients. I use security=user. I don't give shell access to every user, so they can't use smbpasswd. I've tested from a win95 client with the precompiled samba-2.0.4b.i386.rpm: net pass \\greg greg test1 test2 I'd used smbpasswd to change greg's password to test1 on host greg prior to this. Here's the smbpasswd
2008 Aug 15
1
Vectorization of duration of the game in the gambler ruin's problem
Hey fellas: In the context of the gambler's ruin problem, the following R code obtains the mean duration of the game, in turns: # total.capital is a constant, an arbitrary positive integer # initial.capital is a constant, an arbitrary positive integer between, and not including # 0 and total.capital # p is the probability of winning 1$ on each turn # 1-p is the probability of loosing 1$ # N
2007 May 07
1
TukeyHSD fails on my data
Howdo folks, So I have my data (attached). There are two columns I'm interested in; "algname" and "dur". I'd like to know how dur changes with algname. algname is nominal and there are 7 possibilities. There are two more nominal independents, "task" and "id", so my model is: dur ~ algname+task+id From the research I've done, a TukeyHSD
2010 Jan 26
5
Strange tick in ggplot geom_area; and ordering, again
In the area plots below, I see 4 triangle ticks at both sides of the bar; I believe these are non-stacked values for p, but they are definitively confusing. In addition, I would like to get the order of the colors in the plot the same as in the legend, and not arranged alphabetically (the factor is ordered, don't touch my order). Hadley once mentioned an undocumented aestetics
2009 Dec 08
6
conditionally merging adjacent rows in a data frame
Hi, I have a data frame and want to merge adjacent rows if some condition is met. There's an obvious solution using a loop but it is prohibitively slow because my data frame is large. Is there an efficient canonical solution for that? > head(d) rt dur tid mood roi x 55 5523 200 4 subj 9 5 56 5523 52 4 subj 7 31 57 5523 209 4 subj 4 9 58 5523 188 4 subj 4 7
2011 Apr 25
1
Trouble Passing a for loop variable (iteration #) to a data frame
Greetings - I am working on a piece of code to simulate vehicle times in and out in each of a number of parking spaces. At this stage, my code basically does what it is supposed to do but for the sequential number of each new parking event for a given space (i.e., the index of the loop variable). Instead of passing the index of the loop variable (iter) to the data frame, it passes the value
2009 Nov 25
2
order of panels in xyplots
I'd like do a simple xyplot with customized order of panels and try to understand how to use index.cond for that. Several attempts didn't deliver the correct results. Now, I noticed the following: > p <- xyplot(dur~roi|trial, data) > p$index.cond [[1]] [1] 1 2 3 4 5 6 7 8 9 10 These numbers are "valid indexing vector for the integer vector
2015 Apr 28
2
Resumen diseño sencillo
Estimados Estoy realizando algo tan sencillo que no se que forma sería la más apropiada, la situación es la siguiente, hay un data.frame con unos 500 registros, con algunas variables de las cuáles me interesa marcar solo tres, o dicho de otra forma, me interesan tres columnas, de las cuáles cada una tiene entre dos y cuatro factores. Nada complicado, me interesa colocar la combinación de los
2008 Jun 19
2
Capturing draggable revert
I''ve seen a few posts about this, but no answers. I would like to be able to call a function when a draggable revert occurs. What I''m trying to do is replace a photo with an icon on drag (which I''ve accomplished), but I need to swap it back if the revert fires. I really, really wish there were an onRevert() option, but there isn''t, so I guess I''ll
2008 Nov 18
3
High system in %system load .
Hello Got strange problem with high system "%system load" and very slow user level programs (apache+php+mysql) behavior gstat shows 1.5-4% hard disk busy load but system shows about 20-30% load while user load is max 5%. vmstat shows from 2 to 35 process in "b" state. Now use 7.0-RELEASE-p5 , but the same problem was with 7.0-RELEASE. And have no idea what to do with this.