Positron IDE doing Data Analysis with R (Public Beta)

  Рет қаралды 3,492

TheCoatlessProfessor

TheCoatlessProfessor

Күн бұрын

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 Script using CMD + S or CTRL + S.
05:45 Mouse over a file to see its file system path.
06:02 Close the explorer bar for maximum screen space.
06:45 Start coding in an R Script.
07:47 Use CMD + ENTER or CTRL + ENTER to send code from the R script to the console.
09:04 Mouse over URLs and hold CMD or CTRL to make them clickable.
10:00 Discuss session and variables holding code results.
10:42 Observe downloaded data in the R project directory using the file explorer.
11:30 Explore what a Data Frame looks like under the session's Data subheader.
12:00 Trigger the interactive data explorer.
12:27 Identify variable types (pound sign (#) for numbers, (A) for strings/factors).
13:50 Sort data within the interactive data viewer.
15:00 Apply a filter to the data.
16:00 Hide/clear filters.
16:31 Expand the right-hand side to see additional text like variable type and number of observations.
19:00 Modify the dataframe to include a new derived variable that is a factor.
19:40 Open the Data Viewer using the View() function.
20:55 Handle an error with a missing package.
22:36 Graph with ggplot2.
24:35 Explore the plot area of Positron.
26:57 Demonstrate Plotly with ggplot2.
28:31 Count with dplyr.
29:03 Use the pipe operator shortcut (CMD + SHIFT + M or CTRL + SHIFT + M).
30:21 Create a gt() table with the count data.
31:07 Explore help documentation with Positron.
31:38 Run examples to execute static examples within the help window.
31:58 Handle a hiccup when viewing the package's index HTML page.
32:06 Final thoughts.
Summary ---
For this video, we take a look at the Positron IDE's R session features. We focus on using an R project and a single R script file. We explore different portions of the interface, including the famed interactive data viewer.
This video covers a large gambit from setting up keyboard shortcuts similar to what is available in RStudio to creating interactive plots using the {plotly} package.
Links ---
Positron Keyboard Shortcuts Wiki Page
github.com/posit-dev/positron...
Data location:
github.com/coatless/raw-data/...
Relevant script file:
github.com/coatless-videos/po...
Positron Interactive Data Viewer Wiki Page
github.com/posit-dev/positron...
Positron can be obtained from:
github.com/posit-dev/positron
Version information ----
This was demonstrated on:
Positron Version: 2024.06.1 (Universal) build 27
Code - OSS Version: 1.90.0
Commit: a893e5b282612ccb2200102957ac38d3c14e5196
Date: 2024-06-26T02:08:06.673Z
Electron: 29.4.0
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin arm64 23.5.0
#positron #posit #rstudio #ggplot2 #plotly #gt #csv

Пікірлер: 40
@osoriomatucurane9511
@osoriomatucurane9511 Ай бұрын
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.
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
It works great with Quarto! There’s a bit of setup required prior to creating a Quarto document. See: m.kzfaq.info/get/bejne/jtlmiNFy19GrZJc.html
@osoriomatucurane9511
@osoriomatucurane9511 Ай бұрын
@@thecoatlessprofessor7674 Awesome, thank you Professor once again for sharing the resources and keeping us abreast with new developments making data analytics even more exciting.
@econmaett
@econmaett Ай бұрын
Thank you so much for creating this video!
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
Glad it was helpful!
@salvatoremangiafico5268
@salvatoremangiafico5268 Ай бұрын
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.
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
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?
@salvatoremangiafico5268
@salvatoremangiafico5268 Ай бұрын
@@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.
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
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? kzfaq.info/get/bejne/psVkjbZe09S1YoU.html
@salvatoremangiafico5268
@salvatoremangiafico5268 Ай бұрын
@@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.
@Aaqib..
@Aaqib.. Ай бұрын
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.😅😂
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
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?
@Aaqib..
@Aaqib.. Ай бұрын
@@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.🤝🏻
@diegoitibere
@diegoitibere Ай бұрын
I couldn't find the "zoom" option in the plots? Is is still there in Positron or is is just in Rstudio?
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
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
@WhySoBroke
@WhySoBroke 29 күн бұрын
Great video!! Is it possible to load GitHub Copilot in Positron?
@thecoatlessprofessor7674
@thecoatlessprofessor7674 28 күн бұрын
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.
@oluwafemioyedele
@oluwafemioyedele 24 күн бұрын
Great; please can you share the link for me to download positron ?
@thecoatlessprofessor7674
@thecoatlessprofessor7674 24 күн бұрын
See video description for link to repository. I have two videos on the channel showing the download steps for macOS/Windows
@oluwafemioyedele
@oluwafemioyedele 24 күн бұрын
@@thecoatlessprofessor7674thanks, I have figured it out!
@restrollar8548
@restrollar8548 Ай бұрын
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.
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
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.
@richardbennett4365
@richardbennett4365 Ай бұрын
Posit-Ron by Posit. 😮😅🎉😊
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
Heh, nice!
@coopernik
@coopernik Ай бұрын
Prove me wrong but this is just vscode 😅
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
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.
@88fjoe
@88fjoe Ай бұрын
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
@VelkoKamenov
@VelkoKamenov Ай бұрын
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.
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
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).
@oluwafemioyedele
@oluwafemioyedele 26 күн бұрын
Great 🎉
@richardbennett4365
@richardbennett4365 Ай бұрын
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.
@thecoatlessprofessor7674
@thecoatlessprofessor7674 Ай бұрын
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
@georgegl3192
@georgegl3192 10 күн бұрын
i see no need for this if you are a RStudio user.
@thecoatlessprofessor7674
@thecoatlessprofessor7674 10 күн бұрын
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.
@anhc3440
@anhc3440 5 күн бұрын
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?
@thecoatlessprofessor7674
@thecoatlessprofessor7674 4 күн бұрын
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`?
@anhc3440
@anhc3440 4 күн бұрын
@@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
@thecoatlessprofessor7674
@thecoatlessprofessor7674 4 күн бұрын
@@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.
@anhc3440
@anhc3440 4 күн бұрын
​@@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
@anhc3440
@anhc3440 4 күн бұрын
I apologize for jumping straight in with my problem! I want to say I appreciated your content! very clear and easy to follow!
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 66 МЛН
Inside Out Babies (Inside Out Animation)
00:21
FASH
Рет қаралды 23 МЛН
RIP RStudio 🪦 Positron has my 💕
6:22
Josiah Parry
Рет қаралды 7 М.
Data wrangling with R in 27 minutes
27:19
Equitable Equations
Рет қаралды 21 М.
Shinylive - Is this thing on? | TidyX Episode 161
16:37
TidyX
Рет қаралды 1,7 М.
Positron IDE Creating a Quarto Document (Positron Public Beta)
3:41
TheCoatlessProfessor
Рет қаралды 1,3 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 187 М.
What does a Data Analyst actually do? (in 2024) Q&A
14:27
Tim Joo
Рет қаралды 37 М.
Learn R in 39 minutes
38:56
Equitable Equations
Рет қаралды 627 М.
R Styled tables using tidyverse, gt and the scales packages
30:20
Torbjorn Storli
Рет қаралды 2,8 М.
Python Vs R (funny!)
3:23
Luke Barousse
Рет қаралды 127 М.
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 65 МЛН
Ускоряем ваш TV🚀
0:44
ARTEM_CHIBA
Рет қаралды 283 М.
Ba Travel Smart Phone Charger
0:42
Tech Official
Рет қаралды 1,2 МЛН
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 551 М.
Это iPhone 16
0:52
Wylsacom
Рет қаралды 786 М.