This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
EDIT: Figured it out.
deparse(a[[1]]) %>% class
Disclaimer: someone will probably say, this is a terrible idea. Probably is, but I want to know how to do the following regardless.
I am playing around today with some lazy evaluation. I want these inputs converted to strings. The sticking point is that I can't find a way to coerce these inputs into strings because probably, lazyeval is probably not supposed to do this.
library(lazyeval)
library(tidyverse)
m <-
function(...){
inputs<-
lazy_dots(...)
inputs_list = list()
for(i in seq_along(inputs)) {
inputs_list[[i]] = inputs[[i]]$expr
}
inputs_list %>%
unlist
}
a=m(a:"n", c > 10)
# Gives type: 'Lanuage'
typeof(a[[1]])
I would be thrilled to see this written as:
'a:"n"'
and as a character.
The end goal is to start working on a dplyr like syntax to create MongoDB queries for people who do need to use a MongoDB, but are too lazy to learn MongoDB. Which, I hope is everyone because laziness is wonderful
Post Details
- Posted
- 6 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/rstats/comm...