nceas-coding-club / nceas-coding-club.github.io

data-science-chats collaborative website created using Quarto as a way of learning Quarto together!
https://nceas-coding-club.github.io/
5 stars 2 forks source link

Create easy function documentation #16

Open dvirlar2 opened 1 year ago

dvirlar2 commented 1 year ago

Write up like a paragraph explanation of how to write a basic function in R. Using temperature conversion as the example

haleyepperlyfox commented 1 year ago

I think this is a great idea! I also think it would be helpful to write up an example for writing a basic function that uses a dataframe instead of just a vector. I remember when I was learning to write functions I would get stuck because all the examples were just using vectors to print some string typically. That wasn't applicable to whatever I would want to do, which was usually something like editing/formatting a dataframe that I needed to do for 100 dataframes. And I had a difficult time making the connection for how to adapt the example for what I needed to do.