Comments (5)
To be clear, I'm suggesting that we keep a "saving plots" challenge, just suggesting that it changes to the more useful ggsave() topic rather than focusing on a legacy approach.
I don't know that we necessarily want to teach learners all the different ways they might approach a problem, or all the ways they might see in the wild. We only teach ggplot2 in this lesson, and we don't get into the details of base plotting, even though there's plenty of code still generating base plots. If we do keep references to the graphics device functions here, then I think we should minimize it as much as possible, and give learners challenges relating to the tools they're more likely to use instead.
That said, I feel like any changes to focus more on ggsave()
are good, and if the fastest/easiest version of that is simply adding it after the challenge then that's at least an improvement!
from r-intro-geospatial.
You're right. Lesson 8 was written using the function pdf
and dev.off
but using ggsave
is more convenient when the plots are built using the package ggplot
, which is our case.
However, challenge 1 in lesson 8 asks the readers to save in a single file several plots in different pages; which ggsave
doesn't support currently, unless using the function marrangeGrob
from the package gridExtra
(Check Masood Sadat's answer to this question). I'm against adding the package gridExtra
to lesson 8 just for solving one challange.
I guess we could add code using ggsave
as an alternative to pdf
& dev.off
just after the challenge.
from r-intro-geospatial.
Is there a reason we need that challenge? How often is that a task people are trying to accomplish? This isn't something I am commonly trying to do; I feel like I'm either sending people multiple PNGs, or incorporating graphs into an R Markdown/Quarto document to get a single PDF.
We could maybe change the challenge to a ggsave()-based task if that's more relevant for learners.
from r-intro-geospatial.
I think challenge 1 is needed. Lesson 8 contains 2 topics, saving plots and writing CSV data, and accordingly, it has one challenge for each topic.
I'm also in favor of showing readers how to use both pdf
& dev.off
functions, because they're the traditional way of saving plots (by traditional I mean before the tidyverse) and there is a lot of code still using them.
from r-intro-geospatial.
I see your point @mikemahoney218, I think you're right. I'm going to change both the text and the challenge to use only ggsave
.
from r-intro-geospatial.
Related Issues (20)
- Episode 3 Data Structures: Challenge 1 solution: factor is now character
- Episode 3 Data Structures: reword section under Factors
- Episode 3 Data Structures: Adjust Challenge 3 for factors/strings HOT 5
- Episode 3 Data Structures: Revise Solution to Challenge 4
- Episode 4: Data Structures: Exploring Data Frames - Solution to Challenge 2
- Episode 4: Data Structures: Exploring Data Frames - `rbind` and factors
- Lesson Contribution - Moving paragraphs to clarify R vs RStudio HOT 1
- Need jump lists (anchors) for headings HOT 1
- Keypoints and objectives don't match for Exploring Data Frames episode
- Removing factors HOT 3
- Suggestions for Exploring Data Frames Challenge 3 HOT 2
- Episode 2 Project Management With RStudio: A Possible Solution - here::here() instead of getwd() HOT 5
- datacarpentry/r-intro-geospatial HOT 1
- Transition To Workbench in May HOT 12
- Link in reference page returns a 404
- Links need to be fixed in CONTRIBUTING.md
- sandpaper: unknown div text-center
- ggplot2 package HOT 1
- Show learners how to save a plot to an object.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r-intro-geospatial.