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

Saving plotPlacebo as a ggplot object #14

Open
OBW93 opened this issue Jun 7, 2023 · 2 comments
Open

Saving plotPlacebo as a ggplot object #14

OBW93 opened this issue Jun 7, 2023 · 2 comments

Comments

@OBW93
Copy link

OBW93 commented Jun 7, 2023

Even when correctly specifying the output as "ggplot", the plotPlacebo function is always being returned as "data".

@MatthieuStigler
Copy link
Collaborator

@OBW93 OBW93 closed this as completed Jun 7, 2023
@OBW93
Copy link
Author

OBW93 commented Jun 7, 2023

Of course, I am sorry! Using the plotSensi function I am receiving a gg object that I can further adjust but not for the plotPlacebo function. Thank you for the great work - the RDD visualizations are just amazing!

library(rddtools)
library(ggplot2)
r_cov_char <- rdd_data(y=mpg, x=wt, cutpoint=3, data=mtcars) 
reg_np <- rdd_reg_np(rdd_object=r_cov_char)
s1 <- plotSensi(reg_np, output="ggplot",plot=FALSE)
class(s1)
#> [1] "gg"     "ggplot"
p1 <- plotPlacebo(reg_np,output="ggplot",plot=FALSE)
class(p1)
#> [1] "PlaceboVals" "data.frame"

@OBW93 OBW93 reopened this Jun 7, 2023
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