search for: citycode

Displaying 6 results from an estimated 6 matches for "citycode".

2018 Mar 25
3
Take average of previous weeks
Dear all, I have weekly data by city (variable citycode). I would like to take the average of the previous two, three, four weeks (without the current week) of the variable called value. This is what I have tried to compute the average of the two previous weeks; df = df %>% mutate(value.lag1 = lag(value, n = 1)) %>% mutate(value .2.previous...
2016 Apr 20
1
Use multiple cores on Linux
...ly show two). Is it possible to run this code using HPC packages such as Rmpi/snow/doParallel? Thank you! ##################### library(data.table) library(mgcv) library(reshape2) library(dplyr) library(tidyr) library(lubridate) library(DataCombine) # gam_max_count_wk <- gam(count_pop ~ factor(citycode) + factor(year) + factor(week) + s(lnincome) + s(tmax) + s(hmax),data=cont,na.action="na.omit", method="ML") # # Historic temp_hist <- read.csv("/work/sd00815/giss_historic/giss_temp_hist.csv") humid_hist <- read.csv("/work/sd00815/giss_historic/giss_hum_hi...
2018 Mar 25
0
Take average of previous weeks
...open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun, Mar 25, 2018 at 7:48 AM, Miluji Sb <milujisb at gmail.com> wrote: > Dear all, > > I have weekly data by city (variable citycode). I would like to take the > average of the previous two, three, four weeks (without the current week) > of the variable called value. > > This is what I have tried to compute the average of the two previous weeks; > > df = df %>% > mutate(value.lag1 = lag(value, n = 1)) %...
2018 Mar 26
1
Take average of previous weeks
...along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Sun, Mar 25, 2018 at 7:48 AM, Miluji Sb <milujisb at gmail.com> wrote: > > Dear all, > > > > I have weekly data by city (variable citycode). I would like to take the > > average of the previous two, three, four weeks (without the current week) > > of the variable called value. > > > > This is what I have tried to compute the average of the two previous > weeks; > > > > df = df %>% > >...
2001 Nov 27
3
Equations as arguments to functions
...t;- eq} a _ rnorm(100) go(10,eq=a[.5*length(a)]+C+1) > C [1] 20 > d [1] 21.10551 > a[.5*length(a)] [1] 0.1055086 Everything looks good - (BTW seems like a really powerful feature of R) Now on to my code of interest, which doesn't work (shown below). rm(list=ls()) load("datasets/citycodes") increments _ seq(5000,100000,by=5000) makeindex <- function(Y,eq) { losers _ 0; levels_0 index _ 0; location _ 0; cutoff _0; totalapt_0; houses_0 for (C in city[1:2]) { counter _ 0 if (file.exists(paste("datasets/2000income/",C,sep=""))) { load(paste("d...
2006 Jan 27
3
OT?: International number parsing
Can anyone shed some light on "rules" that might make the task of parsing the country code and city codes from a dialed number in the CDRs? I know that there is almost never a case where a concatenated country and city code could overlap with another country code, but what about city codes and local numbers? Is it possible for a concatenated city code and local number to match another