[R] Missing Data Imputation for Complex Survey Data

2014-12-12 Thread N F
Dear all, I've got a bit of a challenge on my hands. I've got survey data produced by a government agency for which I want to use the person-weights in my analyses. This is best accomplished by specifying weights in {survey} and then calculating descriptive statistics/models through functions in th

Re: [R] multiple imputed files

2015-01-26 Thread N F
Hi, I think you want the {mitools} package. http://cran.r-project.org/web/packages/mitools/mitools.pdf. Anthony Damico's site, asdfree.com, has a lot of good code examples using various government datasets. Nate On Mon, Jan 26, 2015 at 5:23 AM, hnlki wrote: > Dear, > > My dataset consists out o

[R] Assigning categorical values to dates

2021-07-21 Thread N. F. Parsons
Hi all, If I have a tibble as follows: tibble(dates = c(rep("2021-07-04", 2), rep("2021-07-25", 3), rep("2021-07-18", 4))) how in the world do I add a column that evaluates each of those dates and assigns it a categorical value such that datescycle 2021-07-04

Re: [R] Assigning categorical values to dates

2021-07-21 Thread N. F. Parsons
levels is that > you might have an awful lot of factors if you have a large enough > dataset. > > > > Quoting "N. F. Parsons" : > > > Hi all, > > > > If I have a tibble as follows: > > > > tibble(dates = c(rep("2021-07-04", 2),

Re: [R] [EXT] Re: Assigning categorical values to dates

2021-07-21 Thread N. F. Parsons
ay my > respects to their Elders. > > > > > > On 22 Jul 2021, 1:47 PM +1000, N. F. Parsons , > wrote: > > External email: Please exercise caution > > > > I am not averse to a factor-based solution, but I would still have to > > manually enter that

Re: [R] Assigning categorical values to dates

2021-07-22 Thread N. F. Parsons
) > > # base R > as.integer(factor(df1$dates)) > match(df1$dates, unique(sort(df1$dates))) > > # dplyr > df1 %>% group_by(dates) %>% mutate(cycle = cur_group_id()) > > > My favorite is by far the 1st but that's a matter of opinion. > > > Hope this

Re: [R] Assigning categorical values to dates

2021-07-22 Thread N. F. Parsons
11:11 AM Uwe Ligges < > lig...@statistik.tu-dortmund.de> wrote: > >> For a data.frame d, I'd simply do >> >> d$cycle <- factor(d$dates, labels=1:3) >> >> but I have not idea about tibbles. >> >> >> Best, >> Uwe Ligges >>