Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example of writing chunks using functions #7

Merged
merged 2 commits into from
Jan 7, 2025
Merged

example of writing chunks using functions #7

merged 2 commits into from
Jan 7, 2025

Conversation

kweav
Copy link
Contributor

@kweav kweav commented Jan 7, 2025

I've added two R files and an example output Rmarkdown from running one of the R scripts.

The first R file (echo_chunks.R) has functions that you can supply argument to and it'll return the text. The second R file (write_cheatsheets.R) calls those functions, concatenating the output together and writes them to an Rmarkdown file that can then be knitted.

How does this look? I can keep putting chunk functions in echo_chunks.R if you like the look of this

@kweav kweav requested a review from carriewright11 January 7, 2025 15:53
Copy link
Contributor

github-actions bot commented Jan 7, 2025

No spelling errors! 🎉
Comment updated at 2025-01-07-20:50:22 with changes from 2a8d45d

Copy link
Contributor

github-actions bot commented Jan 7, 2025

No broken url errors! 🎉
Comment updated at 2025-01-07-20:50:26 with changes from 2a8d45d

Copy link
Contributor

github-actions bot commented Jan 7, 2025

👀 Quick preview of website here *
🔬 Comprehensive download of the website here

* note not all html features will be properly displayed in the "quick preview" but it will give you a rough idea.

Updated at 2025-01-07 with changes from the latest commit 2a8d45d

@carriewright11
Copy link
Member

@kweav looks cool and great start! I wonder if we can write some more generic functions too or make use of a config file to make copy and pasting easier.

@carriewright11
Copy link
Member

Can we practice on a cheatsheet we haven't made yet and add it to the _site.yml so we can more easily preview it?

@kweav
Copy link
Contributor Author

kweav commented Jan 7, 2025

@kweav looks cool and great start! I wonder if we can write some more generic functions too or make use of a config file to make copy and pasting easier.

I like the idea of a config file a lot! Are you imagining a config file for each cheatsheet?

@kweav
Copy link
Contributor Author

kweav commented Jan 7, 2025

Can we practice on a cheatsheet we haven't made yet and add it to the _site.yml so we can more easily preview it?

Practice the way I was doing it (e.g., try this but with course setup), or by trying to make it even more generic/use of a config file?

course setup sounds good! and adding that as a new page on _site.yml so we can preview it. I think what you wrote is really great and pretty universal, but then we might have many steps that we want to write out (aka copy paste) fairly uniquely - I was thinking we could write functions that try to figure out what icon to put based on the text or we could have a config to fill in the html for the icons (and check boxes) (this could be pretty simple I think)

@carriewright11
Copy link
Member

@kweav looks cool and great start! I wonder if we can write some more generic functions too or make use of a config file to make copy and pasting easier.

I like the idea of a config file a lot! Are you imagining a config file for each cheatsheet?

was thinking overall for common things that we add like icons and the check boxes

@carriewright11
Copy link
Member

Maybe let's add a new page to _site.yml based on your test and then we can merge this?

@kweav kweav merged commit 0523458 into main Jan 7, 2025
6 checks passed
@carriewright11
Copy link
Member

oops sorry I didn't mean to edit your comment earlier haha sometimes I do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants