Data analysis using R - Writing Functions - Lecture 2 (Part 2)

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

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

  • @flameon8185
    @flameon8185 9 месяцев назад +1

    Thank you Prof. Nice content.

    • @DannyArends
      @DannyArends  9 месяцев назад +1

      Glad you like it, thanks for leaving a comment

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

    At 46 mins of the video, why is there a need to write myvar

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

      p1 is a function parameter, and as such gets the value assigned to it by a variable. This value can be a reference (quick) or a copy (slow), if you do not change the variable inside of the function it (e.g. only read from it) than the parameter will stay a reference, which is quick and memory efficient.
      If p1 is updated in the function, then the variable that gave the value is not changed (pass-by-promise), but a copy is created as soon as you overwrite the function parameter (slow and duplicates memory).
      Hope this helps.

  • @jinli1835
    @jinli1835 Год назад

    Pls speak English.

    • @DannyArends
      @DannyArends  Год назад

      The Slide in German or Slide in Dutch is just for entertainment, viewers can request it as a reward for watching. I also do the slide in English to make sure everyone understands... I don't think my German is that bad :)