Skip to content

Error I can't figure out #76

@samygero

Description

@samygero

Hello,

it seems the magic wand can't really "convert" the dplyr::group_by function and there also might be an issue with the dplyr piping operator "%>%". I have come to this conclusion because this code works:

code.function <- function(x) {
lol <- x %>% dplyr::summarize(n = n() )
return(lol)
}
magic.wand(code.function)

output(
code.function(
input(mtcars)
),
"/user/sgerony/mtcars/")

but this one does not:

code.function <- function(x) {
lol <- x %>% mutate(lol=mpg/2) %>% group_by(mpg) %>% summarize(maximum=max(lol,na.rm=TRUE))
return(lol)
}
magic.wand(code.function)

output(
code.function(
input(mtcars)
),
"/user/sgerony/mtcars/")

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions