similar to: R: retrieve rows from frame assuming criterion [corrected]

Displaying 20 results from an estimated 300 matches similar to: "R: retrieve rows from frame assuming criterion [corrected]"

2004 Jul 23
2
retrieve rows from frame assuming criterion
Hi all, I have a data frame in which one column(PUNTAR) is of character type. What I want is to retrieve is the frame but only with those rows matching elements of PUNTAR with a list characters (e.g c("IX49","IX48") ) Year TUR STODNR PUNTAR 1994 9412 94020061 IX49 1994 9412 94020062 IX48 1994 9412 94020063 X32 1994 9412 94020065 X23 1994 9412
2004 Jul 23
0
retrieve rows from frame assuming criterion [corrected]
Still wrong: > x <- data.frame(a = sample(letters[1:3], 10, replace=T), b=1:10) > x a b 1 a 1 2 a 2 3 b 3 4 b 4 5 a 5 6 a 6 7 b 7 8 b 8 9 b 9 10 c 10 > subset(x, a == c("b", "c")) a b 3 b 3 7 b 7 9 b 9 10 c 10 > subset(x, a %in% c("b", "c")) a b 3 b 3 4 b 4 7 b 7 8 b 8 9 b 9 10 c 10 What matters
2004 Jul 23
0
R: R: retrieve rows from frame assuming criterion [corrected]
Yes, paraphrasing Murphy I can say of myself: "Nothing seems to be able to stop a stupid thought in its pathway from the brain to the keyboard". :-) Sorry once again and thank for your patience. Stefano > -----Messaggio originale----- > Da: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] > Inviato: venerd?? 23 luglio 2004 16.30 > A: Guazzetti Stefano > Cc: Luis
2004 Aug 27
4
for (i in ...) { df[[i]]<- .....}
R-help, In the following loop : for(i in 1:8) { cc[[i]]<-tapply(test[,i+6],list(puntar=test$puntar),sum)/tapply(test[,5],list(puntar=test$puntar),sum) cbind.data.frame(cc[[1]],cc[[2]],cc[[3]],cc[[4]], cc[[5]],c[[6]],cc[[7]],cc[[8]]) } Is there anyway I can 'cbind.data.frame' the objects cc[[ i ]] without actually writing every single element?? In this case there are 8 but what if
2007 Aug 30
1
boxplot will remember the factor levels
R-help, I'm trying to do a simple box-and-whisker plot to some data. The data are a subset of a large data frame but when running the "boxplot" function on the subset data all the factors are still present in the graph leaving a huge empty space until the actuals factors are shown. This produces a spurious box-and-whisker plot. If the subset data are exported to another R session
2015 Mar 26
2
Acceso gratuito durante un mes a la plataforma DataCamp...
Buenas a todos, La gente de DataCamp se han puesto en contacto con el grupo de Madrid para ofrecernos una oferta para usar gratuitamente su plataforma con diferentes cursos de R durante un mes. Les hemos preguntado si sería posible compartir este ofrecimiento con toda la lista de R-Help-es y no ven mayor problema, les ha parecido muy bien la posibilidad. El link de acceso es el siguiente:
2004 Nov 26
1
unexpected behaviour of 'curve' function
Dear all, curve(x^3*(1-x)^7, from = 0, to = 1) works as expected but, omitting the "xlim" or the "to" and "from" arguments and calling "curve" more than once: par(mfrow = c(2,2)) for (i in 1:4) curve(x^3*(1-x)^7) gives an expected (al least to me) result. Note also that a "pu" object is returned by curve > pu [1] -0.1802445 1.1802445
2007 Nov 13
1
R: Query an Access database based on a date attribute
It seems that Access needs that you surround the dates with a # symbol. You probably need something like. res <- sqlQuery(channel, "select * from test_table where market = 'atl-bos' and competitor = 'delta' and dd = #2007-11-20#") Hope this helps, Stefano -----Messaggio originale----- Da: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]Per
2014 Apr 01
3
problema con RStudio
Hola a todos, Tengo un problema con RStudio y la conexión a una base de datos. Desde la terminal no tengo problemas para ejecutar, por ejemplo: library(RODBC) channel <- odbcConnect("MiBaseDatos", uid = "MiUsuario", pwd = "MiContrasena") datos <- sqlQuery(channel,"SELECT TO_CHAR(S.B_STOD_DATO,'YYYY') \ , M.STODNR \ ... ... ...") pero desde
2010 Aug 07
2
R: Confidence Intervals for logistic regression
a closer look to the help on predict.glm will reveal that the function accepts a 'type' argument. In you case 'type = response' will give you the results in probabilities (that it seems to be what you are looking for). There also is an example on use of the 'type' argument at the end of the page. Stefano -----Messaggio originale----- Da: r-help-bounces at r-project.org
2004 Jul 07
1
AW: boxplot a list of objects
One possibility ist boxplot(sapply(ListOfNames, get, env = .GlobalEnv)) Hope that this helps Thomas -----Urspr??ngliche Nachricht----- Von: Lefebure Tristan [mailto:Tristan.Lefebure at univ-lyon1.fr] Gesendet: Mittwoch, 7. Juli 2004 10:34 An: r-help at stat.math.ethz.ch Betreff: [R] boxplot a list of objects Hi list, #Imagine we have vectors of different length (in practice 100 vectors):
2002 Nov 21
1
more than one level of grouping in xyplot
Dear listers, Let use say that I want to display the Pixel dataset (in the NLME library) xyplot(pixel~day|Dog, groups=Side, data=Pixel, panel=panel.superpose, panel.groups=panel.xyplot, type="b", pch=16) (I know, there are better examples, ...) Now, how could I change the colours of the symbols accordingly to another factor changing within subject and side form time to time? (let us
2014 Apr 01
2
problema con RStudio
Carlos, al parecer tengo instalado el paquete RODBC en : /home/luisr/R/i686-pc-linux-gnu-library/3.0/RODBC/ no hay nada en (carpeta vacia): /usr/local/lib/R/site-library/ en el directorio: /usr/local/lib/R/site-library hay paquetes que vienen con R pero RODBC no saludos, Luis -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Luis Ridao Cruz Faroe Marine Research Institute Nóatún 1,
2007 Mar 08
1
R: Searching and deleting elements of list
you could try mapply mydata2<-mapply("[", mydata, lapply(mydata, function(x) !x %in% A)) mydata2[[1]]<-A #to replace the obviously deleted elements of "A" mydata2 mydata2[[1]] mydata2[[2]] mydata2[[3]] mydata2[[4]] Stefano -----Messaggio originale----- Da: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]Per conto di jastar
2014 Apr 01
3
problema con RStudio
No, no estoy usando Rstudio Server El 1 de abril de 2014, 9:07, Carlos J. Gil Bellosta <cgb@datanalytics.com>escribió: > Una pregunta... no estarás utilizando RStudio server, ¿verdad? > > En tal caso, lo que tienes que hacer es configurar > /etc/rstudio/rstudio.conf tal como indica en > > http://www.rstudio.com/ide/docs/server/configuration > > En particular,
2014 Apr 01
2
problema con RStudio
Hola, ¿qué tal? ¿Puedes comparar la salida del comando Sys.getenv("LD_LIBRARY_PATH") en una sesión en la que funciona RODBC y otra en la que obtienes el error anterior? Un saludo, Carlos J. Gil Bellosta http://www.datanalytics.com P.D.: A propósito, también he estado tratando de utilizar RODBC en Linux y me he acabado rindiendo. Sobre todo porque RJDBC funciona bastante bien.
2024 Mar 14
0
CADFtest difference between max.lag.y with criterion and without criterion
Dear Professor Bernhard, Sorry for take your time, but I found something strange that I am not able to explain/understand. Suppose that I compute the ADF test by using the criterion="BIC" to select the lags: summary(CADFtest(y, max.lag.y = 20, type = "drift", criterion="BIC")) Suppose that 2 lags are selected. Next, if I set the lags to 2: summary(CADFtest(y,
2014 Apr 01
2
problema con RStudio
Pues ahí lo tienes. De alguna manera R (a través de RStudio) no está incorporando el directorio /u01/app/luisr/product/11.1.0/client_1/lib donde se ve que tienes las librerías de ODBC al "LD path". Échale un vistazo a https://support.rstudio.com/hc/communities/public/questions/200641818-How-to-configure-libPaths-?locale=en-us Aparentemente RStudio tiene su propio sistema para
2003 Jun 16
1
stop criterion for stepAIC
Hello, I am using the function stepAIC (library MASS) to run a backward elimination on my linear regression. The new model stepAIC calculates contains coefficients that have a Pr(>|t|) value below 0.1, but I'd like to have only coefficients with 0.001 or below. How can I change the stop criterion for stepAIC, so that it is more strict? There is a parameter "steps", but it is
2011 Aug 15
0
Stopping criterion in option "control" of BBsolve( )
Dear Dr. Gilbert, Dr. Varadhan and all R-help list members, I'm using the function BBsolve( ) and I have some questions on the stopping criterion "maxit" and "noimp" specified in the option "control". Here are two such examples I'm having problem with. In these two examples, the function BBsolve( ) always stops at iteration 100, overlooking the values