R and the Tidyverse: next steps

Поділитися
Вставка
  • Опубліковано 3 гру 2024

КОМЕНТАРІ • 23

  • @asmafarid2939
    @asmafarid2939 3 роки тому +2

    such a smooth flow of tutorials with crystal clear explanation. Appreciated

  • @eyadha1
    @eyadha1 2 роки тому

    Great video. Thank you very much for this

  • @bsamota
    @bsamota 4 роки тому +1

    Excellent Video! Thank you so much!

  • @amendez721
    @amendez721 4 роки тому +2

    Awesome job, thank you very much!!

  • @didierleprince6106
    @didierleprince6106 4 роки тому +1

    Merci Stéphane

  • @nevillemcfarlane6094
    @nevillemcfarlane6094 2 роки тому +1

    Very helpful

  • @kemikao
    @kemikao 4 роки тому +1

    Excelent explanation!

  • @HarshKumar-wc4ql
    @HarshKumar-wc4ql 4 роки тому +1

    great work:)

  • @nevillemcfarlane6094
    @nevillemcfarlane6094 2 роки тому +1

    Great

  • @Joschiiie
    @Joschiiie 3 роки тому +1

    great video, thanks for sharing your knowledge :)
    is it possible to save the ggplots that you created with map() under individual names? (ca. minute 52:24)

    • @uqlibrary
      @uqlibrary  3 роки тому +1

      Thanks Joschiiie!
      To save to individual files, you could create a custom function (instead of making the formula more complex), and then map it to the split dataframe. In this solution, notice how I construct the file name (not sure if there is a better way?). Also, I use walk() instead of map() because we are using the "side effect" (i.e. saving the plot) of the function:
      # custom plot + export function
      save_trend %
      walk(save_trend)

    • @Joschiiie
      @Joschiiie 3 роки тому +1

      @@uqlibrary great, many thanks for your response :) I will check that out!

  • @maadravan
    @maadravan 3 роки тому

    Thank you so much for the great tutorial. Is it possible to use these functions on the rows as well?

    • @uqlibrary
      @uqlibrary  3 роки тому

      Thank you!
      If you want to use the different columns as arguments, and do row-wise operations, a function like purrr::pmap() would help: purrr.tidyverse.org/reference/map2.html

  • @asmafarid2939
    @asmafarid2939 3 роки тому

    Did you also upload any videos on GitLab and importing R projects there please?
    Or any other resource please provide the link. Thanks

  • @missmutagia6080
    @missmutagia6080 2 роки тому

    Hi UQ Library, unable to convert data to long using the given function. I'm getting an error that says "could not find pivot longer". Please help

  • @PatelNaresh111
    @PatelNaresh111 4 роки тому +1

    Hi, I am very new to R and I was struggling initially, after going through a couple of tutorials I feel confident. I have one issue when importing the CSV file, I get X in front of all the years. Could you please help me- how to remove 'X' from all the years?

    • @uqlibrary
      @uqlibrary  4 роки тому +3

      Hi Patel!
      If you have an "X" that appears, it is because read.csv() will automatically "fix" names if they are unconventional, for example adding an "X" at the beginning if the header starts with a number, or replacing spaces with a full stop (because using them as is would throw an error).
      If you don't want that default behaviour, you can use the check.names argument and set it to "FALSE". For example:
      df

    • @PatelNaresh111
      @PatelNaresh111 4 роки тому +1

      @@uqlibrary Thank you very much. learned new troubleshooting by asking questions.

  • @raibanin
    @raibanin 4 роки тому

    whats the use of ~ in map_int(~ length(....))

    • @uqlibrary
      @uqlibrary  4 роки тому

      Hi Raibatak! The tilde "~" is used when you want to apply a more elaborate command instead of simply providing a function name and its arguments. You can then place the element that is processed by the map function (i.e. the ".x") anywhere in the formula, use it several times, nest functions... etc.
      In a nutshell, it gives you more flexibility than the default behaviour (which is "pick a function, use the currently processed element as the first argument, and optionally provide values for further arguments").
      You will find more information with the documentation page, in the section about the argument ".f": ?map

  • @funferwg8563
    @funferwg8563 5 років тому

    Can you help me with this issue?? "package ‘tidyverse’ is not available (for R version 3.1.2)"

    • @uqlibrary
      @uqlibrary  5 років тому +2

      Hi there! R 3.1.2 is from quite a few years ago, and I don't expect it to be supported by most recent R packages. You can see here that R 3.1 support by the Tidyverse was probably dropped earlier this year: www.tidyverse.org/articles/2019/04/r-version-support/
      The first thing I'd recommend you to do is to update your R installation: cran.csiro.au/ (links for downloads are at the top of the page)
      Once you have the latest R installed (currently 3.6.1), try installing the Tidyverse again.