similar to: return() in nested functions

Displaying 20 results from an estimated 12000 matches similar to: "return() in nested functions"

2006 Apr 26
1
help using tapply
Dear R-mates, # Here's what I am trying to do. I have a dataset like this: id = c(rep(1,8), rep(2,8)) dur1 <- c( 17,18,19,18,24,19,24,24 ) est1 <- c( rep(1,5), rep(2,3) ) dur2 <- c(1,1,3,4,8,12,13,14) est2 <- rep(1,8) mydata = data.frame(id, estat=c(est1, est2), durat=c(dur1, dur2)) # I want to one have this: id = c(rep(1,8), rep(2,8))
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
2007 Jan 10
2
select subsets in data frame
Dear WizaRds! A trivial question indeed on selecting subsets in data frames. I am sorry. Unfortunately, I did not find any helpful information on the introduction, searched the help archive and read in introductory books. Please help: I want to select column "KB" which is read via read.csv2 as a data.frame into d. I checked that it is indeed a data.frame object and included the
2005 Oct 31
2
nls() fit to Kahnemann/ Tversky function
Dear WizaRds, I would like to fit a curve to ten points with nls() for one unknown parameter gamma in the Kahnemann/ Tversky function, but somehow it won't work and I am unable to locate my mistake. p.kum <- seq(0.1,1, by=0.1) felt.prob.kum <- c(0.16, 0.23, 0.36, 0.49, 0.61, 0.71, 0.85, 0.89, 0.95, 1) ## how to find a function that fits these points nicely? plot(p.kum,
2007 Nov 24
1
Indexing and partially replacing 99, 999 in data frames
Dear WizaRds, unfortunately, I have been unable to replace the '99' and '999' entries in library(UsingR) attach(babies) as definitions for missing values NA, because sometimes the 99 entry is indeed a correct value. Usually, or so I thought, NAs can easily replace a, say, 999 entry via mymat[mymat==999] <- "yodl" in a matrix or data frame. Alas, the babies'
2007 Jan 27
1
Conditional Selection of Columns for Tables
Dear Wizards - Thank you so much for your help. That was exactly what I was looking for. Now, I have been working on conditional selection of columns in a data frame. My goal is to calculate the total revenue per sales representative per status in a table. I have come to a complete stop: Let's say, we have a data.frame called df with several columns and a number of rows: df <-
2006 Mar 25
2
pairwise combinatons of variables
Dear WizaRds, although this might be a trivial question to the community, I was unable to find anything solving my problem in the help files on CRAN. Please help. Suppose I have 4 variables and want to use all possible combinations: 1,2 1,3 1,4 2,3 2,4 3,4 for a further kmeans partitioning. I tried permutations() of package e1071, but this is not what I need. Thank you for your help and
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
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
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
2005 Sep 09
1
regression with restrictions - optimization problem
Dear WizaRds! I am sorry to ask for some help, but I have come to a complete stop in my efforts. I hope, though, that some of you might find the problem quite interesting to look at. I have been trying to estimate parameters for lotteries, the so called utility of chance, i.e. the "felt" probability compared to a rational given probability. A real brief example: Given is a lottery
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.
2004 Dec 12
1
firefox and R 201
please help. why is it that i cannot open html help pages out of the R menu? here is what I do: using browser firefox1.0 (open source!), java plugin jre 150 installed, supposedly working properly. opening R201patched, html help, link:search engine and keywords: works properly, jre symbol appears. clicking on any link (keywords on that page): no reaction whatsoever. what am i doing wrong?
2013 Mar 05
2
make_dev_physpath_alias
Hello all. I have a supermicro 16 bay box with a LSI 9211-8i card. We use it for temp data storage, and we wanted to try the l4z compression. After updating the source tree to r247839: and doing a make buildworld cycle all works fine. But at boot time we get some warnings. make_dev_physpath_alias: WARNING - Unable to alias gptid/281951f4-a996-11e1-83eb-00259061b51a to enc at
2006 Jun 28
1
persp/ scatterplot3d
Dear WizaRds, I would like to create a 3d-plot with persp(). I sampled 17 points with xyz-coordinates (real-life example!), representing the peaks of the whole plane with "zero coordinates" x=3,y=3,z=3. My intention is to show which entries are above or below the "zero" level with persp() on a nicely created grid. I also tried scatterplot3d(), but, alas, I am unable
2006 Jan 08
1
Clustering and Rand Index - VS-KM
Dear WizaRds, I have been trying to compute the adjusted Rand index as by Hubert/ Arabie, and could not correctly approach how to define a partition object as in my last request yesterday. With package fpc I try to work around the problem, using my original data: mat <- matrix( c(6,7,8,2,3,4,12,14,14, 14,15,13,3,1,2,3,4,2, 15,3,10,5,11,7,13,6,1, 15,4,10,6,12,8,12,7,1), ncol=9, byrow=T )