Effortlessly Simplify Your R Code with These Tips and Tricks

Поделиться
HTML-код
  • Опубликовано: 4 дек 2024

Комментарии •

  • @jonathanjayes
    @jonathanjayes 3 года назад

    Thank you so much - this was fantastic - appreciate it Tom!

  • @timmytesla9655
    @timmytesla9655 2 года назад

    I learnt something new today. Thank you.

  • @SamirNeg
    @SamirNeg 4 года назад +1

    Great stuff, sir!

  • @vic090892
    @vic090892 4 года назад +1

    Pretty useful!
    Thanks a lot!

    • @tomhenry-datasciencewithr6047
      @tomhenry-datasciencewithr6047  4 года назад

      Glad it was helpful!

    • @vic090892
      @vic090892 4 года назад +1

      @@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

  • @kanchanaramar
    @kanchanaramar 2 года назад

    Thanks. This was helpful.

  • @CanDoSo_org
    @CanDoSo_org Год назад +1

    Thanks, Tom. Very useful! Is there a package to help to code more efficiently in R like in VScode, like autocomplete, autofill.

  • @fabiuspocus1430
    @fabiuspocus1430 2 года назад

    Thanks a lot for this video.

  • @tomhenry-datasciencewithr6047
    @tomhenry-datasciencewithr6047  4 года назад +2

    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.

  • @zhizhongpu8937
    @zhizhongpu8937 6 месяцев назад

    super helpful!

  • @long75315987
    @long75315987 2 года назад

    Thank you!!

  • @glennhighcoveexploresstuff
    @glennhighcoveexploresstuff 4 года назад +1

    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?

    • @tomhenry-datasciencewithr6047
      @tomhenry-datasciencewithr6047  4 года назад +1

      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

    • @glennhighcoveexploresstuff
      @glennhighcoveexploresstuff 4 года назад +1

      @@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.

  • @fikarief
    @fikarief 4 года назад

    Is it possible to use styler without RStudio IDE?

  • @redmars2813
    @redmars2813 26 дней назад +1

    How do I make it so styler does 4 indentation spaces instead of 2?

    • @tomhenry-datasciencewithr6047
      @tomhenry-datasciencewithr6047  26 дней назад

      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!

  • @장성호-l6e
    @장성호-l6e 4 года назад

    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!)

  • @filanor2416
    @filanor2416 4 года назад +1

    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!

  • @TheArtistRobEberle
    @TheArtistRobEberle 3 года назад

    10x Ash Running