Displaying 17 results from an estimated 17 matches for "provinciales".
2017 Mar 29
5
names
...variable puntual veo que las
etiquetas de las variables "están" pero la clase del vector no me cierra y
los resultados no los usan. Trato de mostrarlo:
> na.omit(datos[, .(FORM, Region, Dependencia = B2a, Criterios =
D4_Otros.1)])
FORM Region Dependencia Criterios
1: 44 NEA Provinciales 8
2: 47 NEA Provinciales 8
3: 51 NEA Provinciales 8
4: 52 NEA Provinciales 8
5: 58 NEA Provinciales 8
6: 222 NOA Municipales 11
7: 231 NOA Provinciales 12
8: 232 NOA Religiosos 11
9: 235 NOA...
2017 Mar 15
3
Crear una función
...pero, no puedo
hacer que las tablas se llamen como quisiera porque el factor "etiqueta"
que debería indicar el primer nombre de la variable no es consdierado, como
podrán ver.
?Si correo el código para la variable, resulta algo como:
> tabla
Sexo N Porc PorcAc NEA NOA Nacionales Provinciales Municipales
Comunitarios Religiosos Privados
1 Mujer 270 86.8 86.8 92.7 84.2 77.8 89.6 83.8
78.9 90 100
2 Varon 40 12.9 99.7 7.3 15.3 22.2 10.4 16.2
19.3 10 NA
3 <NA> 1 0.3 100.0 NA 0.5 NA...
2017 Nov 09
0
weighted average grouped by variables
Hello
an update about my question: I worked out the following solution (with the package "dplyr")
library(dplyr)
mydf%>%
mutate(speed_vehicles=n_vehicles*mydf$speed) %>%
group_by(date_time,type) %>%
summarise(
sum_n_times_speed=sum(speed_vehicles),
n_vehicles=sum(n_vehicles),
vel=sum(speed_vehicles)/sum(n_vehicles)
)
In fact I was hoping to manage everything in a
2017 Nov 09
1
weighted average grouped by variables
Dear Massimo,
It seems straightforward to use weighted.mean() in a dplyr context
library(dplyr)
mydf %>%
group_by(date_time, type) %>%
summarise(vel = weighted.mean(speed, n_vehicles))
Best regards,
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team
2017 Nov 09
4
weighted average grouped by variables
hi all
I have this dataframe (created as a reproducible example)
mydf<-structure(list(date_time = structure(c(1508238000, 1508238000, 1508238000, 1508238000, 1508238000, 1508238000, 1508238000), class = c("POSIXct", "POSIXt"), tzone = ""),
direction = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L), .Label = c("A", "B"), class =
2017 Nov 09
0
weighted average grouped by variables
hi thierry
thanks for your reply
yes, you are right, your solution is more straightforward
best
Da: "Thierry Onkelinx" <thierry.onkelinx at inbo.be>
A: "Massimo Bressan" <massimo.bressan at arpa.veneto.it>
Cc: "r-help" <r-help at r-project.org>
Inviato: Gioved?, 9 novembre 2017 15:17:31
Oggetto: Re: [R] weighted average grouped by
2006 Apr 06
1
Bell Canada Requests $987.14 Rate increase 911 / VOIP Providers
From the bend me over news department.
2 March 2006
Mr. Leonard Katz
Executive Director
Broadcasting and Telecommunications
Canadian Radio-television and
Telecommunications Commission
Ottawa, Ontario
K1A 0N2
Dear Mr. Katz:
Associated with Bell Canada Tariff Notice No. 6929
1. Attached for the Commission's approval are proposed revisions to
Bell Canada's Access Services Tariff Item
2017 Mar 15
4
Fwd: Crear una función
...pero, no puedo hacer que las tablas se llamen como quisiera porque el factor "etiqueta" que debería indicar el primer nombre de la variable no es consdierado, como podrán ver.
?Si correo el código para la variable, resulta algo como:
> tabla
Sexo N Porc PorcAc NEA NOA Nacionales Provinciales Municipales Comunitarios Religiosos Privados
1 Mujer 270 86.8 86.8 92.7 84.2 77.8 89.6 83.8 78.9 90 100
2 Varon 40 12.9 99.7 7.3 15.3 22.2 10.4 16.2 19.3 10 NA
3 <NA> 1 0.3 100.0 NA 0.5 ...
2017 Nov 22
0
assign NA to rows by test on multiple columns of a data frame
Hello,
Try the following.
icol <- which(grepl("flag", names(mydf)))
mydf[icol] <- lapply(mydf[icol], function(x){
is.na(x) <- x == 0
x
})
mydf
# A A_flag B B_flag
#1 8 10 5 12
#2 7 NA 6 9
#3 10 1 2 NA
#4 1 NA 1 5
#5 5 2 0 NA
Hope this helps,
Rui Barradas
On 11/22/2017 10:34 AM, Massimo Bressan
2017 Nov 22
1
assign NA to rows by test on multiple columns of a data frame
...well, I don't think this is exactly the expected result (see my post)
to be noted that the columns affected should be "A" and "B"
thanks for the help
max
----- Messaggio originale -----
Da: "Rui Barradas" <ruipbarradas at sapo.pt>
A: "Massimo Bressan" <massimo.bressan at arpa.veneto.it>, "r-help" <r-help at
2017 Nov 09
2
weighted average grouped by variables
Hi
Thanks for working example.
you could use split/ lapply approach, however it is probably not much better than dplyr method.
sapply(split(mydf, mydf$type), function(speed, n_vehicles) sum(mydf$speed*mydf$n_vehicles)/sum(mydf$n_vehicles))
gives you averages
aggregate(mydf$n_vehicles, list(mydf$type), sum)$x
gives you sums
Cheers
Petr
> -----Original Message-----
> From: R-help
2017 Nov 11
0
weighted average grouped by variables
> On 9 Nov 2017, at 14:58, PIKAL Petr <petr.pikal at precheza.cz> wrote:
>
> Hi
>
> Thanks for working example.
>
> you could use split/ lapply approach, however it is probably not much better than dplyr method.
>
> sapply(split(mydf, mydf$type), function(speed, n_vehicles) sum(mydf$speed*mydf$n_vehicles)/sum(mydf$n_vehicles))
> gives you averages
>
The
2012 Jun 14
3
mapa provincial de España con googleVis
Se ha borrado un adjunto en formato HTML...
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20120614/518ed68f/attachment.html>
2015 Dec 28
3
Elecciones Generales
De aqui:
http://resultadosgenerales2015.interior.es/congreso/#/ES201512-CON-ES/ES
o en json:
http://resultadosgenerales2015.interior.es/#/herramienta-analisis?siteLanguage=es_ES
dentro del linux estan los archivos
El 28 de diciembre de 2015, 16:30, Javier Marcuzzi <
javier.ruben.marcuzzi en gmail.com> escribió:
> Estimado Ivan Aguilar
>
> Desconozco desde donde toma los datos,
2017 Nov 22
6
assign NA to rows by test on multiple columns of a data frame
Given this data frame (a simplified, essential reproducible example)
A<-c(8,7,10,1,5)
A_flag<-c(10,0,1,0,2)
B<-c(5,6,2,1,0)
B_flag<-c(12,9,0,5,0)
mydf<-data.frame(A, A_flag, B, B_flag)
# this is my initial df
mydf
I want to get to this final situation
i<-which(mydf$A_flag==0)
mydf$A[i]<-NA
ii<-which(mydf$B_flag==0)
mydf$B[ii]<-NA
2004 Oct 28
5
How to help improving Wine?
Hi,
I really did my best to understand how I can help improving Wine, but I did
not succed.
Well, everything started when I installed a win application on my Debian 3.1,
Wine 2004.07.16 deb (clean install, no dlls).
The application is ALOHA (http://www.epa.gov/ceppo/cameo/aloha.htm)
It's a free application from US-Environment Protection Agency used for
chemical emergency planning (I am an
2002 May 22
0
Problem to recognition the user of group Domain Admins
Hello, this is a problem:
We have a debian server 2.2 with kernel 2.4.18 and samba 2.2.4 works as
Domain Controler.
After joing a Domain we read at property administrator of the local
group Administrators of win2000 this:
Administrator
\"Domain"\unix_group.2147483404
rather than
Administrator
\"Domain"\Domain Admins
If we tryng to adding the global group Domain Admins we