lenses icon indicating copy to clipboard operation
lenses copied to clipboard

Elegant Data Manipulation with Lenses

Results 18 lenses issues
Sort by recently updated
recently updated
newest added

These will likely be removed from rlang. It would be great to remove them from lenses the next time you update it. Thanks! - `coerce_type()` - `friendly_type()` - `splice()`

Assigning into an empty filter doesn't work when composed with an `index_l` afterwards. This seems to have to do with special semantics in data.frame indexing, e.g., ``` d[i,"c"]

Assigning to a composed `filter_l` + `index_l` generates an error. Seems that assigning into an empty _subset_ and assigning into an empty _dataframe_ are handled differently, e.g., ```r # for...

aka why R can't have nice things ... ``` iris %>% view(filter_l(.[names(.)[1]] > 7)) ```

From Control.Lens.Unsound --- `lensProduct :: ALens' s a -> ALens' s b -> Lens' s (a, b)` A lens product. There is no law-abiding way to do this in general....

I find `data.tree` cumbersome because of mutation. I want a library free of this inconvenience, but it does a lot of nice things I would miss. Convenient print methods, easy...

The package architecture is taking form, there are some base lenses that are common data manipulations, data.frame lenses, list lenses, array lenses, with many more to come. Maybe each of...

@zsbuchwald noticed an opportunity to use lenses in of her analyses this morning! The task was renaming columns in a matrix: ```r df %>% setNames(c(names(.)[1], paste0("rel-", names(.)[-1]))) ``` became the...

Promote a standard accessor strings, probably limited to `$`, `[`, `[[`, `@`, to a lens e.g ```r promote_l( ~ .[[1]]$col[[2]]@slt[1:5] ) ``` equal to ```r index(1) %.% index("col") %.% index(2)...

seems like all broom functions ought to be lenses