Displaying 8 results from an estimated 8 matches for "allow_dup".
Did you mean:
allow_dupes
2024 Dec 11
1
Cores hang when calling mcapply
...t; "column1" = string(),
> "column2" = string()
> )
> ) |>
> collect()
> )
>
> # Step B: Clean names once
> # Assume `crewjanitormakeclean` essentially standardizes column names
> dt[, column1 := janitor::make_clean_names(column1, allow_dupes =
> TRUE)]
> dt[, column2 := janitor::make_clean_names(column2, allow_dupes =
> TRUE)]
>
> # Step C: Create presence/absence indicators using data.table
> # Use dcast to pivot wide. Set n=1 for presence, 0 for absence.
> # For large unique values, consider chunking if n...
2024 Dec 11
1
Cores hang when calling mcapply
...gt; "column1" = string(),
> "column2" = string()
> )
> ) |>
> collect()
> )
>
> # Step B: Clean names once
> # Assume `crewjanitormakeclean` essentially standardizes column names
> dt[, column1 := janitor::make_clean_names(column1, allow_dupes =
> TRUE)]
> dt[, column2 := janitor::make_clean_names(column2, allow_dupes =
> TRUE)]
>
> # Step C: Create presence/absence indicators using data.table
> # Use dcast to pivot wide. Set n=1 for presence, 0 for absence.
> # For large unique values, consider chunking if need...
2024 Dec 11
1
Cores hang when calling mcapply
...???? "column2" = string()
> >??? )
> >? ) |>
>
> >??? collect()
> > )
> >
> > # Step B: Clean names once
> > # Assume `crewjanitormakeclean` essentially standardizes column names
> > dt[, column1 := janitor::make_clean_names(column1, allow_dupes =?
>
> > TRUE)]
> > dt[, column2 := janitor::make_clean_names(column2, allow_dupes =
>
> >? TRUE)]
> >
> > # Step C: Create presence/absence indicators using data.table
> > # Use dcast to pivot wide. Set n=1 for presence, 0 for absence.
> > # Fo...
2024 Dec 11
2
Cores hang when calling mcapply
...rings contained within them, as an example, one set has ~29k unique values and the other with ~15k unique values (no overlap across the two).
Using a combination of custom functions:
crewjanitormakeclean <- function(df,columns) {
df <- df |> mutate(across(columns, ~make_clean_names(., allow_dupes = TRUE)))
return(df)
}
mass_pivot_wider <- function(df,column,prefix) {
df <- df |> distinct() |> mutate(n = 1) |> pivot_wider(names_from = glue("{column}"), values_from = n, names_prefix = prefix, values_fill = list(n = 0))
return(df)
}
sum_group_function <- f...
2024 Dec 11
1
Cores hang when calling mcapply
...gt; "column1" = string(),
> "column2" = string()
> )
> ) |>
> collect()
> )
>
> # Step B: Clean names once
> # Assume `crewjanitormakeclean` essentially standardizes column names
> dt[, column1 := janitor::make_clean_names(column1, allow_dupes =
> TRUE)]
> dt[, column2 := janitor::make_clean_names(column2, allow_dupes =
> TRUE)]
>
> # Step C: Create presence/absence indicators using data.table
> # Use dcast to pivot wide. Set n=1 for presence, 0 for absence.
> # For large unique values, consider chunking if need...
2024 Dec 11
1
Cores hang when calling mcapply
...>??? )
> > >? ) |>
> >
> > >??? collect()
> > > )
> > >
> > > # Step B: Clean names once
> > > # Assume `crewjanitormakeclean` essentially standardizes column names
> > > dt[, column1 := janitor::make_clean_names(column1, allow_dupes =?
> >
> > > TRUE)]
> > > dt[, column2 := janitor::make_clean_names(column2, allow_dupes =
> >
> > >? TRUE)]
> > >
> > > # Step C: Create presence/absence indicators using data.table
> > > # Use dcast to pivot wide. Set n=1 for...
2024 Dec 12
1
Cores hang when calling mcapply
...gt; "column1" = string(),
> "column2" = string()
> )
> ) |>
> collect()
> )
>
> # Step B: Clean names once
> # Assume `crewjanitormakeclean` essentially standardizes column names
> dt[, column1 := janitor::make_clean_names(column1, allow_dupes =
> TRUE)]
> dt[, column2 := janitor::make_clean_names(column2, allow_dupes =
> TRUE)]
>
> # Step C: Create presence/absence indicators using data.table
> # Use dcast to pivot wide. Set n=1 for presence, 0 for absence.
> # For large unique values, consider chunking if need...
2024 Dec 12
1
Cores hang when calling mcapply
...> > >
> > > >??? collect()
> > > > )
> > > >
> > > > # Step B: Clean names once
> > > > # Assume `crewjanitormakeclean` essentially standardizes column names
> > > > dt[, column1 := janitor::make_clean_names(column1, allow_dupes =?
> > >
> > > > TRUE)]
> > > > dt[, column2 := janitor::make_clean_names(column2, allow_dupes =
> > >
> > > >? TRUE)]
> > > >
> > > > # Step C: Create presence/absence indicators using data.table
> > > >...