Posts

Showing posts with the label rstudio

myfantasyleague using R studio

myfantasyleague using R studio I am interested in getting some of my leagues information from myfantasyleague.com. I am pretty new to Rstudio and don't fully understand the tricks to it. But I would like to gain access to my leagues rosters page and get the contract information. Myfantasyleague has a sample code on the API website (https://www74.myfantasyleague.com/2018/api_info?STATE=example), but I am note sure how to begin. If anyone has suggestions on how to get the login information in R to go through to the website I would really appreciate it. I can learn from there, but I just need help getting started. Thanks! By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Build a RStudio addin to debug pipe chains

Build a RStudio addin to debug pipe chains I wrote a function that helps executing pipe chains step by step. To use it the users has to copy the instruction to clipboard, then execute the function, and move to the console to proceed. I would like to build an addin that would allow me to select the instructions and run the function with Ctrl + P without the awkward steps. Ctrl + P Ideally, the addin would : I believe it's extremely similar to what the reprex addin is doing but I don't know where to start as I'm 100% new to addins. I looked into rstudioapi::getActiveDocumentContext() but there was nothing there of interest to me. rstudioapi::getActiveDocumentContext() How can I make this work ? The function debug_pipe <- function(.expr){ .pchain <- if (missing(.expr)) readClipboard() # windows only , else try clipr::read_clip() else deparse(substitute(.expr)) .lhs <- if (grepl("^\s*[[:alnum:]_.]*\s*<-",.pchain[1])) { sub("^\s*([[:...