@@tomhenry-datasciencewithr6047 Sure it was! I am sometimes investing time to correct indentation when I move or delete part of the code, this will save me a couple of mins. And it will be pretty useful to format my coworkers scripts that are usually quite messy xD
Let me know if this helps you clean code in RStudio! PS -- subscribe if you liked this video because I'll be posting more resources on working with R code in RStudio over the next few weeks.
Thank you, that was super-helpful. In terms of tabs/indentation, what is the accepted general practice? Some of us are learning R in the wild and probably have some atrocious-looking code out here. What you demonstrated is a major fix for us, but what underlying rule or standard is this applying?
Hi Glenn! This is the best short resource on R style that I know of at the moment: adv-r.had.co.nz/Style.html It covers * File names * Object names * Spacing * Curly braces * Line length * Indentation * Assignment * Commenting
@@tomhenry-datasciencewithr6047 Thank you, now bookmarked! I'm really enjoying these videos, I return to them often to relearn core skills and have seen my skills and R aptitude advance as a result. You are really doing a good deed with this series. I'm starting to really love R as a result.
Open your Rprofile configuration file by running this command in R: ```file.edit(file.path("~", ".Rprofile"))``` Once the file is open, add the following lines to set the indentation level to 4 spaces (e.g., for the tidyverse style): ```options(styler.addins_style_transformer = "styler::tidyverse_style(indent_by = 4L)")``` After saving the file, restart your R session. Keen to hear how it goes, it works for me on Mac but I have not tested on other systems!
Fantastic! Thanks so much! I want you to give me a lecture.. with any data, 1. From a series of preprocessing processes, 2. Selecting significant variables, 3. Setting up models by classificarion or prediction 4.Can you tell me how to compare models with various model evaluation(ex.ME, RMSE, MAE, MPE, MAPE, MASE). Thank you (with tidyverse package!)
Can you please increase font-size? it is really hard to see the codes even in 1080p. Also, if you add the script for example, via github or elsewhere and paste the link here, that would be great. thanks for the effort!
Thank you so much - this was fantastic - appreciate it Tom!
I learnt something new today. Thank you.
Great stuff, sir!
Thank you kindly!
Pretty useful!
Thanks a lot!
Glad it was helpful!
@@tomhenry-datasciencewithr6047 Sure it was! I am sometimes investing time to correct indentation when I move or delete part of the code, this will save me a couple of mins. And it will be pretty useful to format my coworkers scripts that are usually quite messy xD
Thanks. This was helpful.
Thanks, Tom. Very useful! Is there a package to help to code more efficiently in R like in VScode, like autocomplete, autofill.
Thanks a lot for this video.
Let me know if this helps you clean code in RStudio!
PS -- subscribe if you liked this video because I'll be posting more resources on working with R code in RStudio over the next few weeks.
super helpful!
Thank you!!
Thank you, that was super-helpful. In terms of tabs/indentation, what is the accepted general practice? Some of us are learning R in the wild and probably have some atrocious-looking code out here. What you demonstrated is a major fix for us, but what underlying rule or standard is this applying?
Hi Glenn! This is the best short resource on R style that I know of at the moment: adv-r.had.co.nz/Style.html
It covers
* File names
* Object names
* Spacing
* Curly braces
* Line length
* Indentation
* Assignment
* Commenting
@@tomhenry-datasciencewithr6047 Thank you, now bookmarked! I'm really enjoying these videos, I return to them often to relearn core skills and have seen my skills and R aptitude advance as a result. You are really doing a good deed with this series. I'm starting to really love R as a result.
Is it possible to use styler without RStudio IDE?
How do I make it so styler does 4 indentation spaces instead of 2?
Open your Rprofile configuration file by running this command in R:
```file.edit(file.path("~", ".Rprofile"))```
Once the file is open, add the following lines to set the indentation level to 4 spaces (e.g., for the tidyverse style):
```options(styler.addins_style_transformer = "styler::tidyverse_style(indent_by = 4L)")```
After saving the file, restart your R session.
Keen to hear how it goes, it works for me on Mac but I have not tested on other systems!
Fantastic! Thanks so much!
I want you to give me a lecture.. with any data, 1. From a series of preprocessing processes, 2. Selecting significant variables, 3. Setting up models by classificarion or prediction 4.Can you tell me how to compare models with various model evaluation(ex.ME, RMSE, MAE, MPE, MAPE, MASE). Thank you (with tidyverse package!)
As soon as possible!
Can you please increase font-size? it is really hard to see the codes even in 1080p. Also, if you add the script for example, via github or elsewhere and paste the link here, that would be great. thanks for the effort!
Great suggestions! I'll add the script too shortly.
10x Ash Running