Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ysym without quotes (for the lazy) #45

Open
hojsgaard opened this issue Nov 17, 2019 · 1 comment
Open

ysym without quotes (for the lazy) #45

hojsgaard opened this issue Nov 17, 2019 · 1 comment

Comments

@hojsgaard
Copy link
Collaborator

Typing the quotes in eg ysym is extra work. How about allowing something like

library(Ryacas)

ysym2 <- function(s){
s_ <- substitute(s)
s2 <- as.character(s_)
ysym(s2)
}

ysym3 <- function(s){
s_ <- substitute(s)
s2 <- as.character(s_)
assign(s2, ysym(s2), envir = .GlobalEnv)
}

Giving

a <- ysym2(a)
a
y: a
ysym3(b)
b
y: b

@ggrothendieck
Copy link
Contributor

If this were done it would be important that it be separate from ysym with both available. Look at the mess tidyverse got itself into requiring rlang and all its associated complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants