- 64
- 246 524
TheCoatlessProfessor
United States
เข้าร่วมเมื่อ 23 ม.ค. 2020
Run R Calculations on Remote Clusters with {future}
Learn how to harness the power of cluster computing from your local R session! Specifically, we'll discuss how to transform your regular R code into turbocharged computations by distributing work across multiple computers through future topologies.
Using Stanford's FarmShare 2 cluster as our example, we'll walk through:
- Understanding cluster computing basics
- Setting up the 'future' R package for cluster work
- Running parallel computations across multiple machines
- Moving data between your computer and the cluster
- Live demonstrations of job submission and monitoring
Timeline
0:00 - What's a cluster and why use one?
1:00 - Meet Stanford's FarmShare
2:24 - The three future topologies to run your R code on a cluster
4:04 - Setting up your computing resources (memory, time, etc.)
5:50 - Making your code run faster with parallel processing
8:30 - Success! Seeing your cluster results in action
10:41 - Moving data between your computer and the cluster
13:38 - Getting your system ready for cluster computing
💻 Code & Resources:
FarmShare 2 Documentation: docs.farmshare.stanford.edu/
GitHub Repository: github.com/coatless-videos/future-topology-demo
🔗 Connect with me:
GitHub: github.com/coatless
Website: thecoatlessprofessor.com
LinkedIn: www.linkedin.com/in/jamesbalamuta/
BlueSky: bsky.app/profile/coatless.bsky.social
Mastodon: mastodon.social/@coatless
Twitter/X: axiomsofxyz
#rstats #parallelprocessing #distributedcomputing #futureverse #future #rprogramming #programming #cluster #farmshare #stanford #rstudio #tutorial
❓ Have questions? Leave them in the comments below!
Using Stanford's FarmShare 2 cluster as our example, we'll walk through:
- Understanding cluster computing basics
- Setting up the 'future' R package for cluster work
- Running parallel computations across multiple machines
- Moving data between your computer and the cluster
- Live demonstrations of job submission and monitoring
Timeline
0:00 - What's a cluster and why use one?
1:00 - Meet Stanford's FarmShare
2:24 - The three future topologies to run your R code on a cluster
4:04 - Setting up your computing resources (memory, time, etc.)
5:50 - Making your code run faster with parallel processing
8:30 - Success! Seeing your cluster results in action
10:41 - Moving data between your computer and the cluster
13:38 - Getting your system ready for cluster computing
💻 Code & Resources:
FarmShare 2 Documentation: docs.farmshare.stanford.edu/
GitHub Repository: github.com/coatless-videos/future-topology-demo
🔗 Connect with me:
GitHub: github.com/coatless
Website: thecoatlessprofessor.com
LinkedIn: www.linkedin.com/in/jamesbalamuta/
BlueSky: bsky.app/profile/coatless.bsky.social
Mastodon: mastodon.social/@coatless
Twitter/X: axiomsofxyz
#rstats #parallelprocessing #distributedcomputing #futureverse #future #rprogramming #programming #cluster #farmshare #stanford #rstudio #tutorial
❓ Have questions? Leave them in the comments below!
มุมมอง: 198
วีดีโอ
Control a web browser from R to web scrap static and dynamic websites using {chromote}
มุมมอง 721หลายเดือนก่อน
Learn to scrape static and dynamic JavaScript websites using R and Chromote! Perfect for data scientists working with modern web applications. In this tutorial, you'll learn: - How to use Chromote R package with Chrome DevTools Protocol - Scraping JavaScript-generated content - Handling dynamic page elements - Converting web data to R dataframes - Cleaning and analyzing scraped data Projects Co...
Positron IDE Layout Options (Public Beta)
มุมมอง 9635 หลายเดือนก่อน
Timeline 00:00 Intro 00:05 Overview of layout options at the top right. 00:10 Customize layout option explained. 00:15 Toggle the Sidebar to hide/show the right-hand side. 00:27 Demonstrate the effect of toggling the Side Bar. 00:40 Toggle the main panel to show/hide the console. 00:47 Toggle the left-hand sidebar with various tools. 01:02 Quick icon shortcuts for layouts. 01:07 Customize layou...
Positron IDE Connecting to a Database in R and Displaying in the Connections Panel (Public Beta)
มุมมอง 1.1K5 หลายเดือนก่อน
Timeline 00:00 Intro and problem of missing database wizard. 0:31 Creating a new R file and saving it in a new folder. 0:44 Naming the new folder and script. 1:03 Setting up the R script for commands to generate the connection. 1:09 Explaining the connections contract used in the panel. 1:32 Reusing R Studio's connection contract technology in Positron. 1:42 Supported databases for connections....
Positron IDE: Data Analysis with Python in Jupyter Notebooks and Python Script Files (Public Beta)
มุมมอง 4.4K5 หลายเดือนก่อน
Timeline 00:00 Intro to Positron IDE for data science. 00:15 Focus on Python; other videos cover R. 00:27 Check Python interpreter or environments. 01:10 View environment and interpreter details. 01:23 Switch environments; auto-detects/install dependencies. 01:54 Auto-installs ipykernel if missing. 02:02 Transition between environments. 02:35 Use the new project wizard if needed. 02:45 Create J...
Positron IDE doing Data Analysis with R (Public Beta)
มุมมอง 6K5 หลายเดือนก่อน
Timeline 00:00 Intro 00:25 Select R as the interpreter from the upper right corner. 00:40 View the usual R startup message in the lower-left window. 00:50 Discussion on keyboard shortcuts. 02:00 Enable RStudio keyboard shortcut mapping in Positron. 02:47 Create a new R Project in Positron for data analysis. 04:10 Discuss setting the working directory correctly in the R Project. 05:02 Save R Scr...
Positron IDE accessing Projects on macOS using an Alfred workflow for Project Manager Extension
มุมมอง 4345 หลายเดือนก่อน
Timeline 00:00 Intro, macOS-only 01:03 Motivation behind creating the workflow (similar to finding .Rproj) 01:46 The "full Garrick approach" 01:57 Discussion of fees related to Raycast vs. Alfred 02:36 Project Manager workflow for Alfred 03:25 Why not remap .code-workspace to open in Positron instead of VS Code? 04:48 Project Manager Extension on OpenVSX 05:34 Installing the Alfred workflow for...
Positron IDE with Editor Color Themes (Public Beta)
มุมมอง 2.5K5 หลายเดือนก่อน
Timeline 00:00 Intro 00:10 Positron IDE is a fork of open-source Visual Studio Code (VS Code / OSS - Code). 00:19 Most VS Code themes will work in Positron IDE. Check vscodethemes.com for a list. 00:26 Themes must be published on the OpenVSX registry to work in Positron, as it is the default marketplace for extensions. 00:35 View installed themes in the Command Palette with CMD K T (macOS) or C...
Positron IDE accessing GitHub Copilot via {chattr} R Package (Public Beta)
มุมมอง 1.5K5 หลายเดือนก่อน
Timeline 00:00 Greetings and introduction to Positron IDE for data science and its ability to use a code assist agent like GitHub Copilot. 00:15 Mentioning that the demonstration will focus on R, as there's no known official extension for GitHub Copilot in Positron. 00:32 Checking the Extensions tab in Positron and noting the absence of a GitHub Copilot extension. 00:45 Highlighting the availab...
Positron IDE Creating Two Single File Shiny Apps in R and Python (Public Beta)
มุมมอง 1.8K5 หลายเดือนก่อน
Timeline: 00:00 Intro 00:16 Install Shiny extension from OpenVSX 00:52 Create R Script for Shiny App 01:42 Saving the App in a non-home directory (e.g. ~/Desktop or ~/Documents) using Cmd S / Cntrl S 02:02 Discussing the play button change when the script file is named app.R 02:16 Running the R Shiny App by pressing play and viewing it in the "Viewer" panel 03:20 Creating a Python script for th...
Positron IDE Creating a Quarto Document (Positron Public Beta)
มุมมอง 2.3K5 หลายเดือนก่อน
Timeline 00:00 Intro 00:20 Create a new file by clicking the " " icon in the top left. 00:26 View supported file types in the Command Palette (e.g., .R, .py, .ipynb). 00:34 Open the Extensions tab via the left-hand menu or use CMD SHIFT X (macOS) or CTRL SHIFT X (Windows). 00:50 Search for and install the Quarto extension from the marketplace. 01:09 Create a new Quarto document by clicking the ...
Positron IDE Debugger for R Demo with Nested Functions (Public Beta)
มุมมอง 1.2K5 หลายเดือนก่อน
Timeline 00:00 Introduction: Discussing Positron's debugging capabilities. 00:05 Overview: Demonstrating a debugging function script with nested calls (F, G, and H functions). 00:16 Running the Script: Calling function F with argument -4 and running the script by pressing the run button or using the keyboard shortcut Cmd Shift S (macOS) or Cntrl Shift S (Windows). 00:17 Error Message: Script is...
Downloading and Installing Positron IDE Public Beta by Posit on Windows 10 or Above
มุมมอง 2.4K5 หลายเดือนก่อน
Summary Open Web Browser Go to github.com/posit-dev/positron or go directly to: github.com/posit-dev/positron/releases/latest Select "Releases" on the right-hand side of the GitHub repository Select the first item in the release list to obtain the latest release. Find and click on the release asset of: "Positron-[some value].exe" This works on only Windows x64 (Intel/AMD) processors. (Note: The...
Downloading and Installing Positron IDE Public Beta by Posit on macOS
มุมมอง 1.7K5 หลายเดือนก่อน
Summary Open Web Browser Go to github.com/posit-dev/positron or go directly to: github.com/posit-dev/positron/releases/latest Select "Tags" underneath "Releases" on the right-hand side of the GitHub repository Select the first tag to have the latest release. Find and click on the release asset of: "Positron-[some value].dmg" This works on both ARM and Intel macs (It's a universal installer). On...
Proof of Concept: A Step Toward Interactive Serverless Python Documents using Pyodide and Quarto
มุมมอง 530ปีที่แล้ว
Summary Discover the seamless fusion of Pyodide, a web-based Python version, with Quarto, a cutting-edge scientific publishing platform, in this concise proof of concept (POC) video. Watch Python code dynamically evaluated in-browser, experience effortless recall of Python objects across cells, and explore the ease of importing and using Python packages. Through combining Pyodide and Quarto we ...
Creating a Serverless R Shiny App using Quarto with R Shinylive ("Include" method)
มุมมอง 12Kปีที่แล้ว
Creating a Serverless R Shiny App using Quarto with R Shinylive ("Include" method)
Your first webR-powered Quarto Document using the {quarto-webr} Extension and RStudio
มุมมอง 2.6Kปีที่แล้ว
Your first webR-powered Quarto Document using the {quarto-webr} Extension and RStudio
macrtools: Install the R Compilation Toolchain for macOS
มุมมอง 2.1Kปีที่แล้ว
macrtools: Install the R Compilation Toolchain for macOS
Installing unixodbc and sqliteodbc using Homebrew on macOS to setup SQLite for RStudio's Connections
มุมมอง 1.3Kปีที่แล้ว
Installing unixodbc and sqliteodbc using Homebrew on macOS to setup SQLite for RStudio's Connections
Downloading and Installing Homebrew on macOS
มุมมอง 646ปีที่แล้ว
Downloading and Installing Homebrew on macOS
Working with SQLite3 in R using RStudio's Connection Panel on Windows
มุมมอง 853ปีที่แล้ว
Working with SQLite3 in R using RStudio's Connection Panel on Windows
Downloading and Installing SQLite ODBC driver for Windows 10 or Above
มุมมอง 4.7Kปีที่แล้ว
Downloading and Installing SQLite ODBC driver for Windows 10 or Above
Downloading and Installing R 4.2.2 on Windows 10 and above
มุมมอง 5Kปีที่แล้ว
Downloading and Installing R 4.2.2 on Windows 10 and above
Downloading and Installing RStudio by Posit on Windows 10 or above
มุมมอง 1.4Kปีที่แล้ว
Downloading and Installing RStudio by Posit on Windows 10 or above
Downloading and Installing Visual Studio Code on macOS for both Intel and arm64 (M1/M2)-based Macs
มุมมอง 3.9Kปีที่แล้ว
Downloading and Installing Visual Studio Code on macOS for both Intel and arm64 (M1/M2)-based Macs
Downloading and Installing R 4.2.2 on macOS with an Intel mac
มุมมอง 1.4Kปีที่แล้ว
Downloading and Installing R 4.2.2 on macOS with an Intel mac
Downloading and Installing RStudio by Posit on macOS for both Intel and arm64-based macs
มุมมอง 729ปีที่แล้ว
Downloading and Installing RStudio by Posit on macOS for both Intel and arm64-based macs
Downloading and Installing PuTTY on Windows 10 and above
มุมมอง 1.8K2 ปีที่แล้ว
Downloading and Installing PuTTY on Windows 10 and above
Connecting to the Hardware Learning Accelerated Cluster (HAL) on Windows using PuTTY
มุมมอง 1312 ปีที่แล้ว
Connecting to the Hardware Learning Accelerated Cluster (HAL) on Windows using PuTTY
Thank You .
You are welcome!
This is really good. Thanks TheCoatlessProfessor.
You're very welcome! Glad you like it.
0:53 After pasting the code in my terminal I'm getting "zsh: number expected", and after a while "zsh: command not found: #" and then it terminates. Please what can I do about this?
Not sure why that's happening, I think there might be a copy and paste error. Consider closing Terminal and starting from the beginning.
Super helpful, thanks a lot
Glad it was helpful!
LOVE THIS VIDEO! THIS IS SO HELPFUL!
I cannot thank you enough!!! I was so frustrated, couldn't figure it out on my own. :)
Glad I could help!
I have issues on height of the shinylive window, any way to size it?
'conda' is not recognized as an internal or external command, operable program or batch file.
I'm running your notebook on a vanilla Positron install but the magic commands such as `%view penguins` is throwing an AttributeError. Both Python and Jupyter extensions are installed. Is there anything else I need to check for these commands to work? Thanks for the tutorial btw!
Double-check that you have the latest version of Positron, the interactive viewer has received a few behind the scene tweaks. Also, make sure pandas is loaded. The following should work in a two-cell sequence. Cell 1: import pandas as pd penguins = pd.read_csv("github.com/coatless/raw-data/raw/refs/heads/main/penguins.csv") penguins.head() Cell 2: %view penguins
Man Thank you! I was experimenting with Fooocus on my M3. That Git file ate about ~70GB of hard drive space and I only had created 6 images!!! I'm sticking with Colab...
ERROR: Cannot install into directories with spaces What do I do?
The solution here would be to install it into a directory that does not have spaces. I think during the installation you should be able to supply a different path, e.g. Do you accept the license terms? [yes|no] Please answer 'yes' or 'no':' >>> yes miniconda3 will now be installed into this location: /root/miniconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below You should be able to provide a different path that lacks a space, e.g. [/root/miniconda3] >>> /opt/miniconda3 Though, this might be an accident on your end if you've hit enter too frequently during the installation steps. It may make sense to just retry it.
I'm curious to try out Amazon Q as part of Positron
I have this for the last part. What should I do ? % vi ~/.bash_profile ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "~/.bash_profile" [New]
Is there a similar way to debug from a specific row onwards like we do with RStudio's red-dot breakpoints to the side of the scripts? Thanks.
Breakpoints are not available yet. You can create a similar experience by placing above the line of code you wanted to explore by typing: browser() So, if we had: f <- function(x, y) { z <- x + 1 browser() a <- z + y return(a) } f(1, 2) The debugger would be engaged after the function was called and its first statement was executed.
Thanks for this great tutorial. I like the layout of Positron IDE. I use Rstudio and most of my scripts are .rmd file. I have tried to run these scripts in Positron but always get an error. Does Positron support Rmarkdpwn files? If yes, how can I run all my code and get figures plotted as they are displayed in Rstudio? Note: I have the latest Positron and Quarto Extension is installed. You can recommend some tutorials too.
R Markdown support for Quarto is a bit iffy at the moment. I should have a video or two in another week or so.
I created the same app.R file on my desktop. When I try to run the file with the option 'Run Shiny App', I get this error 'Could Not find R. R is installed on your system? If R is installed, please make sure your PATH environment variable is configured correctly'. The same app works perfectly in Rstudio when I use 'Run app'. Did you maybe set something different during the Positron installation? Thanks
When you go to the selector in the top right, is Positron able to find your R installation? There's been a few issues with the R installation path being detected on Windows. I would check out: github.com/posit-dev/positron/discussions/3677
@@thecoatlessprofessor7674 Hi, thank you for your quick response. Yes, I selected R 4.4.1 but if I run the app using the the option 'Run Shiny App', I get the error I previously mentioned. Instead, if I run step by step the code using the option 'Source R file', the app works. R is regurarly recognized by Positron, because I am also able to run R scripts or quarto scripts. I have just problems when I try to run a shiny app (both single file and splitted files ui.R - server.R) using directly the option 'Run Shiny App'
Solved!. I re-installed R 4.4.1 on my laptop without modifying the default library where packages are stored (C:\Users\<my_user>\AppData\Local\R\win-library\4.4) and now the shiny app works perfectly using directly the option 'Run Shiny App'. In my previous R installation I changed the .libPaths variable to store all packages elsewhere and this caused the error in Positron
@@alessandrosperanza3909 Ahh! Thanks for reporting back. Glad to hear everything is working.
I'm relatively new to programming so pardon the basic question - I'm trying to run .rmd files in Positron (files created and run in VSCode & Rstudio just fine), but cannot. I'm seeing in Output a warning of "Warning: rPackageTask tasks are unavailable in the current environment." Edit to add Terminal output: rmarkdown::render(g:\\My Drive\\Graduate\\2024-SU-MGT6203\\3. MGT6203_Exams\\final.Rmd) Error: unexpected '\\' in "rmarkdown::render(g:\\" Execution halted * The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command & 'C:\Program Files\R\R-4.4.1\bin\x64\R.exe' -e 'rmarkdown::render("g:\\My Drive\\Graduate\\2024-SU-MGT6203\\3. MGT6203_Exams\\final.Rmd")'" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it." Googling has not produced solutions. Do you have any insights?
That's a bit odd. What happens when you try to use RStudio to render the same file? A couple of thoughts off the top of my head: 1. Do you have Quarto installed on your system? And are you using the latest version of Positron? quarto.org/docs/download/ 2. Can you move the document onto your Desktop? Off of `My Drive`? 3. Can you remove the space and period inside of the file path? e.g. `3. MGT6203_Exams` goes to `3_MGT6203_Exams`?
@@thecoatlessprofessor7674 Thank you for your reply! 0. The same file is rendered normally in RStudio 1. I do not have Quarto installed - I figured RStudio, VSCode, and now Positron should be more than enough. Do I need Quarto to run Positron smoothly? 2. I tried to run the file after moving it to Desktop, same Warning in Output and error message in Terminal 3. I tried this, same issue
@@anhc3440 You need to ensure that Quarto is installed in order to render an Rmd document in Positron. Please make sure you have the latest version of Positron to have access to the Quarto Extension.
@@thecoatlessprofessor7674 installing Quarto was part of the solution! Thank you!! Order of events: installed Quarto - reran file UNSUCCESSFULLY - uninstalled/reinstalled everything - everything works now! Part of the issue prior was that the editor didn't even display the .rmd files properly - the whole file appears like a text file, none of the code lines were color coded, code chunks did not have "run cell/run above" buttons. After the reinstalling, everything appears properly and file renders successfully. Unsure why the first installation didn't run things properly, but alas, it's forever the mythical "turn it off and back on" phenomenon
I apologize for jumping straight in with my problem! I want to say I appreciated your content! very clear and easy to follow!
I can't run a simple "Hello World" It just says source("c:\path_to_rscript"). I thought by default it comes with all tools for R?
Let's say you have the following "hello_world()" function: hello_world <- function(name) { message("Hello world", name) } After running source("c:\path_to_script"), you need to attach the debugger to the function, e.g. debugonce(hello_world) or for multiple calls, specify: debug(hello_world) Then, call the hello_world("test") function. This should engage the debugger.
i see no need for this if you are a RStudio user.
It helps greatly with more advanced features to have the R session run separately from the IDE instead of inside it. You can quickly end up having RStudio run into a few hiccups.
Is it possible to create different types of quarto documents, I mean website, book, etc. in Positron IDE?
You will have to go through the command palette. Open it by pressing CNTRL + SHIFT + P (Windows) or CMD + SHIFT + P (macOS). Then, type: Quarto: Create Project From there, you have the option of default, website, blog, book, or manuscript.
@@thecoatlessprofessor7674 Thank you a lot!
Thank you very much for the explanation. I cannot read .csv from local folder to plot figure or table. I added in _quarto.yml [static-dir: data] but in shinylive it does not found the file.
You shouldn't be able to. The Shiny application is running in a virtual file system instead of your local file system. Thus, the data.csv file you have will not be present. You can add data to a shiny app by following: tutorials.thecoatlessprofessor.com/r-shinylive-data-include/include-download-from-url.html
I would like to see one of your videos on how to upgrade Positron IDE
Okidokie. I’ll record something later today.
At the moment this seems almost identical to using a Jupyter notebook in VS Code, but I guess the ambitions for it are big!
It's similar; but there are some features that are MIA and other features that reorganization different portions. For instance, the jupyter tab is now being reported inside of the variables panel (note issue at: 11:33.), the in-cell notebook debugger is missing, and the python setup process is painless.
Thanks for the video but this is by no means the experience of Copilot/ No way this would replace the natural use of CoPilot in Rstudio or Vsc..
I agree completely! Unfortunately, this is the only way for someone who has access to GitHub Copilot to take advantage of their subscription within the Positron IDE at the moment due to licensing issues, c.f. github.com/posit-dev/positron/issues/476 The Posit team are aware of the limitation and are planning for improvements around the first release candidate.
Thanks🎉
Great; please can you share the link for me to download positron ?
See video description for link to repository. I have two videos on the channel showing the download steps for macOS/Windows
@@thecoatlessprofessor7674thanks, I have figured it out!
Do you think 4 gb rtx3050 enough for data analysis?
The Positron IDE and Python are RAM and CPU hungry. Unless you are fitting a neural network/doing deep learning, the amount of RAM on a GPU is unlikely to play a role in being able to do data analysis effectively.
I like to place the activity bar at the top of the primary side bar as it's neater.
I’ll have to give that a go. Thanks for the suggestion!
Great video!! Is it possible to load GitHub Copilot in Positron?
It’s not possible to use a GitHub copilot extension due to MS licensing issues in Positron. If you have a Copilot subscription, the only way forward is to use {chattr} R package. Otherwise, you will need to stay in VS code or switch to an LLM that has an extension on OpenVSX.
This thing is just a rehash of what we already have with Code, as this software is a fork of it, and marimo and jupyter.
Not at all. The set up here is instantaneous and it's using a new high-performance R kernel and Language Server Protocol implementation called Ark that is licensed under the MIT License, c.f. github.com/posit-dev/ark
Posit-Ron by Posit. 😮😅🎉😊
Heh, nice!
Thanks for an excellent practical introduction to python in Positron!
Glad it was helpful!
This should be good in the future, especially for R. But they need to enable remote ssh / dev containers! On their list, but not yet there.
Yup, it's early days for the new IDE. If you already leaped to VS Code for more advanced features, this IDE is probably missing some features of your current workflow.
Is there support for using this IDE with Databricks?
You can establish a connection using odbc to a Databricks cluster via its connection panel, c.f. solutions.posit.co/connections/db/databases/databricks/
@@thecoatlessprofessor7674 Thank you!
I couldn't find the "zoom" option in the plots? Is is still there in Positron or is is just in Rstudio?
There is no option yet in the Positron IDE for zooming on plots. You can only focus different windows. They are tracking it as a feature in: github.com/posit-dev/positron/issues/2270
Great and thanks for sharing this. Is it possible to edit a chosen theme and change/apply a different background color for example?
Yes, you can select a theme and, then, personalize it by adding into the user settings. Use CMD + SHIFT + P on macOS or CNTRL + SHIFT + P on Windows and search for: Preferences: Open User Settings (JSON) Next, use the following to change the sidebar color only under the Monokai theme: ``` "workbench.colorCustomizations": { "[Monokai]": { "sideBar.background": "#347890" } } ``` Switch [Monokai] with the relevant theme name and use relevant keys via: code.visualstudio.com/api/references/theme-color Section on Customizing a Theme: code.visualstudio.com/docs/getstarted/themes#_customize-a-color-theme
@@thecoatlessprofessor7674 Awesome. Thank you so much.
thanks
You're welcome!
Would you know why the native pipe operator shortcut ( Cmd+Shift+M) doesn't work in Quarto, only in an normal R script?
Need to enable RStudio Keymap extension, c.f. th-cam.com/video/-jhTjOK4vQ8/w-d-xo.html github.com/posit-dev/positron/wiki/Keyboard-Shortcuts#rstudio-keymap
@@thecoatlessprofessor7674 Legend!
Hi! I'm wondering which software you're using for layout of the keyboard input on the bottom?
Videos are recorded using Screenflow (macOS app).
RevealJS output formatting also works fine, just needed to update/install the library(xfun). Loving it.
Yes i am loving it so far, seemless experience with R and Python, i never liked working with Python in R studio, that was a mess for me tbh, Positron is a breeze. Quarto works fine too. So far i haven't encountered any issues, except that i am not able to move the panes around.😅😂
Mmm, what happens when you try to drag and drop different parts of the interface? Also, what happens when you click on the layout button in the upper right corner of Positron?
@@thecoatlessprofessor7674 i uninstalled and reinstalled on my newer machine, works fine, on the old one changing layout wasn't doing anything. Like i still would end up having the same layout. Now it is just the way i like it.🤝🏻
This is absolutely Superb. Thank you for working us through some of the great feature of this awesome IDE. I hope it works well with Quartto.
It works great with Quarto! There’s a bit of setup required prior to creating a Quarto document. See: m.th-cam.com/video/Xs6UnArkG4c/w-d-xo.html
@@thecoatlessprofessor7674 Awesome, thank you Professor once again for sharing the resources and keeping us abreast with new developments making data analytics even more exciting.
Thank you so much for creating this video!
Glad it was helpful!
Thanks. This was helpful. One thing I was absolutely missing is that, on Windows, ctrl-enter runs the line and sends the output to the console. Still a lot I don't understand about the functionality, but at least at this point I can _use_ it.
Could you clarify a bit on the functionality remark? Is there a particular use case you are after or are you trying to understand where the editor would fall in your workflow?
@@thecoatlessprofessor7674 Well, one thing I wonder about is running a chunk of code --- and getting the output in the console, or the plot displayed --- like you can do by highlighting a chunk and pressing the run button in RStudio. I guess for people who use this kind of IDE, that's not desirable ? Better to ctrl-enter ? ... And then basically everything with the debugger. I can't make heads or tails of how to use it.
So, I think there's a lot of questions surrounding an analysis using Quarto instead of just an R script? Does that sound about right? In that case, I would say you still have the ability to run code cells by using Cmd/Ctrl+Enter for a single line, Cmd/Ctrl + Shift + Enter or the "Run Cell" button for the entire cell. If you want to create in the R script file a similar "cell" appearance, you need to use `#+` instead of the python version of `# %%`. It's really good to develop keyboard muscle memory instead of using a point-and-click mouse as that takes additional time to complete a task, e.g. pressing a run button. Regarding the debugger, have you check out this video? th-cam.com/video/p_4ZS-nnQ2Q/w-d-xo.html
@@thecoatlessprofessor7674 Thanks. For my comments, no, nothing about Quarto. Just running a script. I still can't figure out how to run a chunk of the script. But more fundamentally, why this isn't a simple press of a button. Like, obviously, that's not how people use this software. Or they set cells or breakpoints or something if they want to do that. I just haven't quite figured the mentality of using this software. (I'm not familiar with VSCode, just RStudio and Spyder). ... I do think a few issues come down to things being in beta. Your debugging video was helpful. But, for example, trying to use Run and Debug; it tells me I don't have an R debugger; and then when I try to install from the options, it tells me it's not compatible with Positron. I take it this is just a beta issue, or I just have no idea what I'm doing. ... It's no biggy. None of this I need to figure out right away. Just trying to see if this kind of software will improve what I do, or if I'm just a RStudio and Spyder person.
Prove me wrong but this is just vscode 😅
The Positron IDE is a _fork_ of the open source Visual Studio Code (OSS - Code). So, it should feel a lot like VS Code in certain areas. One huge benefit to this approach: Access to VS Code extensions published onto OpenVSX.
With much better IDE experience for data workflows! VScode data analysis experience is a mess with chaotic interpreter manager, subpar dataframe viewer via 3rd party plug-ins and a missing variable viewer pane
Actually VS Code can be set in a very similar manner for Python with the Data Wrangler Extension for data frame viewing (it is official Microsoft Extension) and a variable pane is present when running code through an interactive jupyter window (it can be set in the settings when running a line of code to be automatically send to a jupyter window). However, in Positron it is great that all this functionality is available out of the box and also for R because in VS Code I never found a suitable R extension to work with.
I agree it's really nice that a lot of the functionality is just _there_ without needing to setup the editor. Psst, the variable panel is still present in the panel bar when using a Jupyter notebook ;) Though, none of the variables will appear nor will the debugger/breakpoints work correctly in notebook view (so a slight downgrade from the current status quo in VS Code for Python).
Great 🎉
How about a video of the basic functionality of Positron ? Coming from RStudio and Spyder, I'm having some difficulty understanding the basics of how to use Positron. Like, to get output in the console or plots window, do you have to make the call from the console ? Or, am I being stupid or missing the point of the software ?
Yes! That's coming a little later today. I had to do some last minute traveling this weekend that prevented me from showing a workflow video. In the interim, you can use Cmd + Enter to run individual lines inside of the editor. They'll automatically be populated over to the Console. Similarly, any graphing functions like ggplot() or plot() will appear inside of the "Plot" window on the lower right. This fork of VS Code for DS isn't necessarily explained well at the moment. So, I wouldn't worry too heavily. Again, it's early days. Be prepared to ask questions.
Check out: th-cam.com/video/-jhTjOK4vQ8/w-d-xo.html Let me know what you think. This is just exploring the data side. I'll need a separate one for the R packages component...
Not working properly, error no xxxx file found
Can you provide a bit more details on the error? Is the error associated with the Shiny for Python or Shiny for R demo? Did you accidentally save the `app.R`/`app.py` into the home directory, e.g. `~/`, instead of into a subfolder like `~/Documents` or `~/Desktop`?
@@thecoatlessprofessor7674 It was downloaded from positron itself, but in some other videos it explains with GitHub installation, It worked then. Thank you for your prompt reply.
Hei! Do you know if there's some way to have different colour for code and output in the console?
Not that I'm aware of. I do know that if you directly write into the console there is some highlighting that is applied. However, once the code is executed then it is just treated as output. Since they tried to stick a bit close to what is possible with VS Code's theming, maybe check inside the theme file? github.com/posit-dev/positron/blob/f82368fc01eb72ff844d304174eeb81a585477ce/extensions/theme-defaults/themes/light_modern.json The reference spec for a VS Code theme is over at: code.visualstudio.com/api/references/theme-color You could also raise this as a question on the Positron repository's discussion board: github.com/posit-dev/positron/discussions
Thanks for the video. Can you do one for installing Positron IDE in Fedora Linux?
Sorry, I can't! I do not have a VM setup for Fedora Linux.
@@thecoatlessprofessor7674 Ok, no problem.