similar to: loop para repetir valores de un vector

Displaying 20 results from an estimated 400 matches similar to: "loop para repetir valores de un vector"

2014 Feb 26
2
error en ifelse
Hola No es lo mismo pero en mi caso personal la forma que utilizo se basa en el ejemplo de http://cran.r-project.org/doc/contrib/grafi3.pdf página 49, no usa el if pero también hay una condición para todos los verdaderos. No intenté en este caso en particular, habría que ver si también da problemas, pero como Carlos Ortega que sabe mucho dio una solución y como vos estas empezando no quiero
2014 Feb 26
2
error en ifelse
El problema puede estar en el no uso de suficientes paréntesis. Por ejemplo, con: > a=1 > b=0 > c=0 la instrucción ifelse(((a>1) | (b=0) | (c=1) | (d=1)), 11, 22) da el resultado esperado: [1] 11 Pero si se omiten los paréntesis se llega a un error de interpretación: destino de la asignación se expande a un objeto fuera del lenguaje Espero que sirva Jorge El 26/2/14, daniel
2015 Apr 23
2
cálculo de distancias
¡Hola! Estoy tratando de hacer una matriz que contenga los valores de distancias entre distintos elementos (con sus respectivas coordenadas x e y), pero salta un error, y no sé como corregirlo. ¿alguna idea? muchas gracias! saludos!! Priscila -- Dra. Priscila Ana Powell Instituto de Ecología Regional Facultad de Ciencias Naturales e Instituto Miguel Lillo Universidad Nacional de Tucumán
2012 Nov 05
1
Logistic Regression with Offset value
Dear R friends. I´m trying to fit a Logistic Regression using glm( family='binomial'). Here is the model: *model<-glm(f_ocur~altitud+UTM_X+UTM_Y+j_sin+j_cos+temp_res+pp, offset=(log(1/off)), data=mydata, family='binomial')* mydata has 76820 observations. The response variable f_ocur) is a 0-1. This data is a SAMPLE of a bigger dataset, so the idea of setting the offset is to
2006 Jun 06
3
memory.limit function not found
I have installed R 2.2.1 in Solaris 10 and am trying to increase the memory capacity (the system has 16G RAM) to 3 or 4G, but I keep getting: > memory.limit(size=3000) Error: couldn't find function "memory.limit" Am I missing anything? I do that all the time under Windows. Any help would be appreciated. Thanks Priscila [[alternative HTML version deleted]]
2016 Jun 30
3
Repetir datos en una tabla
Buen día amigos, Tengo una tabla con registros de datos por día y quisiera convertirla en horas, es decir, repetir una fila 24 veces. Lo puedo hacer manualmente pero es un registro de 5 años y tardaría una eternidad. ¿Saben cual es método más rápido? De antemano muchas gracias. Atte. Marco. [[alternative HTML version deleted]]
2012 Nov 14
2
Jackknife in Logistic Regression
Dear R friends I´m interested into apply a Jackknife analysis to in order to quantify the uncertainty of my coefficients estimated by the logistic regression. I´m using a glm(family=’binomial’) because my independent variable is in 0 - 1 format. My dataset has 76000 obs, and I´m using 7 independent variables plus an offset. The idea involves to split the data in let’s say 5 random subsets and
2014 Feb 26
3
error en ifelse
Hola gente!! Estoy empezando a trabajar con R, y no puedo resolver lo siguiente: Quiero crear una nueva variable (datmatriz) que toma el valor de 1 si: -la variable sp es igual a L.lucidum -alguna de las variables pap11, pap06, pap01, pap96 es igual a muerto. El script que utilicé es : guaran$datmatriz<-ifelse (guaran$sp=="L.lucidum"|guaran$pap11 ==
2005 Dec 07
0
Are minbucket and minsplit rpart options working as expected?
Dear r-list: I am using rpart to build a tree on a dataset. First I obtain a perhaps too large tree: > arbol.bsvg.02 <- rpart(formula, data = bsvg, subset=grp.entr, control=rpart.control(cp=0.001)) > arbol.bsvg.02 n= 100000 node), split, n, loss, yval, (yprob) * denotes terminal node 1) root 100000 6657 0 (0.93343000 0.06657000) 2) meses_antiguedad_svg>=10.5 73899 3658
2009 Oct 06
0
Interpolation
Hi R community I need to interpolate precipitation data for a natural park. I have precipitation data from some climate stationts. (I know the table is not complete but I only need to show you X,Y, Altitude and PrepJul) X Y Altitude PrepJan PrepFeb PrepMar PrepAp PrepMay PrepJun PrepJul 597706 4093438 41 0 9 77,8 63,1 17,5 0 2,6 597535
2012 Oct 31
0
predict glm() with offset
Dear R friends. I have a question about running a glm( family= 'binomial', *offset=T*), (I know offset is a vector of values) My doubt is about predicting the values on a new data. Does the predict() function considers the offset? o should I especified something? Here is the model I´m using: *model<-stepAIC(glm(f_ocur~altitud+UTM_X+UTM_Y+j_sin+j_cos+temp_res+pp, offset=(log(1/offset))
2011 Sep 23
1
Envfit, inconsistant result?
Hi R-experts, I am using the envfit function over an ordination of floristic data. The problem is that every time that I run it changes the results. Sometimes dramatically, selecting variables that the first time were not significant. I do not get what could be the problem or if is normal given the permutations are different. # the NMDS ordination gap_flor_NMDS_chord <- metaMDS(gaps_flor,
2023 Jan 31
3
How to calculate the derivatives at each data point?
Hi everyone, I have a vector with atmospheric measurements (x-axis) that is obtained/calculated at different altitudes (y-axis). The altitude is uniformly distributed every 7 meters. For example my dataframe is: df <- dataframe( *altitude* = c(1005, 1012, 1019, 1026, 1033, 1040, 1047, 1054, 1061, 1068), *atm_values* = c(1.41, 1.40, 1.39, 1.38, 1.37, 1.37, 1.38, 1.36, 1.33, 1.31)
2010 Sep 24
7
help
Estimados Escribo para consultar sobre el uso de modelos mixtos anidados. Los datos que estoy analizando provienen de censos de malezas en cuatro tipos de paisajes de la región pampeana, en los que seleccioné al azar igual número de lotes agrícolas cultivados con tres cultivos (maíz, soja y trigo-soja). En cada lote censé el número de especies de malezas en tres posiciones: el alambrado, el borde
2023 Jan 31
1
[EXT] How to calculate the derivatives at each data point?
Try something like with(df, predict(smooth.spline(x = altitude, y = atm_values), deriv = 1)) Cheers, Andrew -- Andrew Robinson Chief Executive Officer, CEBRA and Professor of Biosecurity, School/s of BioSciences and Mathematics & Statistics University of Melbourne, VIC 3010 Australia Tel: (+61) 0403 138 955 Email: apro at unimelb.edu.au Website: https://researchers.ms.unimelb.edu.au/~apro
2023 Jan 31
1
How to calculate the derivatives at each data point?
Hi Konstantinos Not exactly derivative but > diff(df[,2]) [1] -0.01 -0.01 -0.01 -0.01 0.00 0.01 -0.02 -0.03 -0.02 May be enaough for you. Cheers Petr > > -----Original Message----- > From: R-help <r-help-bounces at r-project.org> On Behalf Of konstantinos > christodoulou > Sent: Tuesday, January 31, 2023 10:16 AM > To: r-help mailing list <r-help at
2011 Apr 15
1
Idetntifying nearest topographic contours to data points
Hi there, I have two data sets, one of locations at different elevations (x,y,z) and the other of points that make up topographic contours (also x,y,z). I have used: result<-apply(distppll(data2,cbind(topocon[-nrow(topocon),],topocon[-1,])),1,min) where 'data2' are my measurement coordinates (x, y) and 'topocon' are my topographic contours (x,y). While this gives me an output
2010 Feb 04
1
Rcommander en español
Hola todos: acabo de actualizar R a R 2.10.1, y cuando actualice Rcmdr (Versión 1.5-4) me cargo la versión en inglés, no me acuerdo que hice antes para tener Rcmdr en español (trabajo con windows XP). alguien podría recordarme lo que hay que hacer? Gracias Gabriela. ______________________________ Lic. María Gabriela Cendoya Magíster en
2006 May 03
2
Nested model and variance partitioning
Dear R users, I face to a nested pattern and despite the numerous examples in the help I am still confused. I sampled bugs in different habitats within sites which were within rivers themselves within different regions. The habitat correspond to different substrata (not systematically present in all sites). For rivers and sites, I have environemental variables (e.g. altitude and slope of
2008 Sep 05
3
how to draw the legend about color from 3d picture
I have drawed a picture with persp, it's 3d map with different color, indicate different altitude. In gnuplot, the corresponding command 'splot' will generate a picture beside to indicate the relationship between color and altitude. But in R, how to draw it? I have read the manual of legend, but they are all about how to draw a legend with colored text, not a continuous varing color