Using paths in R and why you shouldn't be using setwd (CC179)

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

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

  • @BobBeatski71
    @BobBeatski71 2 года назад +1

    Using relative paths to organise data, code, and output gets a big thumbs up from me. 👍

  • @fcasoqueiroz
    @fcasoqueiroz 2 года назад +1

    fantastic!!!! I'm so glad to discover this channel!!!

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

      Wonderful! Be sure to tell your friends 🤓

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

    I've also found the package here to be handy for this, although this adds in an extra package so this seems a straightforward approach.

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

      I’ve mainly used here within R markdown documents. Have you found it useful in scripts too?

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

      @@Riffomonas I am using here for code as well... Just need to put a .here file in your root, No need for Project file to identify the root dir

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 2 года назад +1

    Good advice! I rarely use setwd() for my projects since I keep everything in one place (project folder). However, there is a program that can help with the file path and fact that Mac uses forward slashes and PC backward slashes and that is a tiny package called "here". "here" appears to eliminate the issues with Mac vs PC in terms of path. I wondered if you could spend a few minutes going over that package?

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

      Thanks! I covered it about a year ago in the context of r markdown. But that’s a good idea to revisit it package.

  • @cristinavesbach9612
    @cristinavesbach9612 2 года назад +1

    what is the value of using >path

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

      Hmmm. I’ve never seen that before. Do you have a link to an example?