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

Look into what's shown / not shown in examples #1396

Closed
jennybc opened this issue Apr 4, 2022 · 2 comments
Closed

Look into what's shown / not shown in examples #1396

jennybc opened this issue Apr 4, 2022 · 2 comments
Assignees
Labels
documentation upkeep maintenance, infrastructure, and similar

Comments

@jennybc
Copy link
Member

jennybc commented Apr 4, 2022

I stumbled across this example:

https://readr.tidyverse.org/reference/write_delim.html?q=excel#ref-examples

# \dontshow{
.old_wd <- setwd(tempdir())
# }
# If only a file name is specified, write_()* will write
# the file to the current working directory.
write_csv(mtcars, "mtcars.csv")
write_tsv(mtcars, "mtcars.tsv")

# If you add an extension to the file name, write_()* will
# automatically compress the output.
write_tsv(mtcars, "mtcars.tsv.gz")
write_tsv(mtcars, "mtcars.tsv.bz2")
write_tsv(mtcars, "mtcars.tsv.xz")
# \dontshow{
setwd(.old_wd)
# }

where the directory setting / re-setting code is being shown, but the intent certainly seems to be to hide it.

We probably need to update some of the example formatting technology.

@sbearrows sbearrows self-assigned this Aug 25, 2022
@sbearrows sbearrows added documentation upkeep maintenance, infrastructure, and similar labels Aug 25, 2022
@jennybc
Copy link
Member Author

jennybc commented Sep 1, 2022

Based on searching our code base, this does seem to be our current preferred way of doing this. I don't see any obvious improvement. And yet it is also true that the \dontshow{} is not having the intended effect in pkgdown sites, here in readr and in other package where we use it. Suspect this is a pkgdown issue.

@jennybc
Copy link
Member Author

jennybc commented Sep 1, 2022

r-lib/pkgdown#2188

I don't think there's anything to be done about this readr, at least not now.

@jennybc jennybc closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation upkeep maintenance, infrastructure, and similar
Projects
None yet
Development

No branches or pull requests

2 participants