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

Unexplainable error #1739

Closed
3 tasks done
xiaodaigh opened this issue Dec 14, 2019 · 6 comments
Closed
3 tasks done

Unexplainable error #1739

xiaodaigh opened this issue Dec 14, 2019 · 6 comments

Comments

@xiaodaigh
Copy link

@xiaodaigh xiaodaigh commented Dec 14, 2019

Below are the content in my rmarkdown file.

---
title: "Test"
output: rmarkdown::html_vignette
---

` ` ` {r setup, include = FALSE}
remotes::install_github("xiaodaigh/disk.frame", ref="development")
suppressPackageStartupMessages(library(disk.frame))
library(fst)
library(magrittr)
library(nycflights13)
library(dplyr)
library(data.table)

# you need to run this for multi-worker support
# limit to 2 cores if not running interactively; most likely on CRAN
# set-up disk.frame to use multiple workers
if(interactive()) {
  setup_disk.frame()
  # highly recommended, however it is pun into interactive() for CRAN because
  # change user options are not allowed on CRAN
  options(future.globals.maxSize = Inf)  
} else {
  setup_disk.frame(2)
}


knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
` ` `

` ` `{r asdiskframe, cache=TRUE}
library(nycflights13)
library(dplyr)
library(disk.frame)
library(data.table)

# convert the flights data to a disk.frame and store the disk.frame in the folder
# "tmp_flights" and overwrite any content if needed
flights.df <- as.disk.frame(
  flights, 
  outdir = file.path(tempdir(), "tmp_flights.df"),
  overwrite = TRUE)

flights.df
` ` `

` ` `{r, dependson='asdiskframe'}
library(disk.frame)
flights.df %>%
  group_by(carrier) %>% # notice that hard_group_by needs to be set
  summarize(count = n(), mean_dep_delay = mean(dep_delay, na.rm=T)) %>%  # mean follows normal R rules
  collect %>% 
  arrange(carrier)
` ` `

When I Knit it in RStudio I get this error

image

However, when I run it cell by cell I don't get any error.

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('rmarkdown'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/rmarkdown').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

@cderv
Copy link
Collaborator

@cderv cderv commented Dec 15, 2019

Hello,

It does not seems like a rmarkdown issue. This seems to be an error that comes from one of your chunk. For this kind of general question, you should ask on https://community.rstudio.com or SO as suggested on the issue guide you read https://yihui.org/issue/#got-a-question
There is a broad community there to help you with your questions. It could help find what is going on faster I think.

Hope it helps

@xiaodaigh
Copy link
Author

@xiaodaigh xiaodaigh commented Dec 15, 2019

Ok

@cderv
Copy link
Collaborator

@cderv cderv commented Dec 15, 2019

Hi, I did not meant that you should close... sorry if it felt that way.
I just wanted to advice to ask this question also on a place like community.rstudio.com because there is a much broader audience of helpers there that could contribute to solve this with you.
It seems like an issue at the interaction of rmarkdown, knitr, dplyr, disk.frame and RStudio IDE.

@xiaodaigh
Copy link
Author

@xiaodaigh xiaodaigh commented Dec 15, 2019

@xiaodaigh
Copy link
Author

@xiaodaigh xiaodaigh commented Dec 15, 2019

@github-actions
Copy link

@github-actions github-actions bot commented Nov 3, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants