Asking Good Questions

Asking Good Questions
Author

Alexandra Arabio

Published

January 26, 2023

Prompt:

Asking good questions is a valuable skill to have - asking questions in an online setting is both easier and harder than asking questions in person: we can prepare to ask a question but we are also expected to prepare. The links posted here give some advice on how to ask good questions:

Follow these links and read through the advice given, then

  1. Pick at least one question from stackoverflow or the R help and answer it.

Write a blog post answering the following questions:

  1. Document which question you answered (link to your answer).

Link to question

Answer: Once using the plot function you are building the base for your figure. To be able to add to that initial figure you can use the lines() function or the points() to add any addition data information to that plot.

Given your data, you could use the following code to accomplish your task.

`{r} x <- seq(-2, 2, 0.05) y1 <- pnorm(x) y2 <- pnorm(x, 1, 1) plot(x, y1, type = “l”, col = “red”) plot(x, y2, type = “l”, col = “green”)

plot(x, y1, type = “l”, col = “red”) + lines(x, y2, type = “l”, col = “green”) ``` This will produce the following figure.

Solution

  1. Relate your experience of answering the question to your reading.

From the Stack Overflow ‘How do I ask a good question?’, it discussed how it is easier to provide answers to questions when they are summarized, specific, and reproducible. Because of this, I kpet these in mind when searching for questions to answer. I found a question that was to the point in what they needed to accomplish and provided simple data to work with as an example. Following the advice from Stack overflow ‘How to create a Minimal, Reproducible Example’ I started from scratch on my own device and broke the question into simple, traceable steps.

Instructions to follow.