While creating a Quarto blog on Rstudio, why is the output truncated?

Not sure how to create a reprex, but whenever i'm trying to create a quarto blog, the output gets truncated in this manner. The numbers are not shown clearly and there's no way to expand the columns. What can I do to overcome this?

image

image

image

Using the following version of RStudio:

RStudio 2022.12.0+353 "Elsbeth Geranium" Release (7d165dcfc1b6d300eb247738db2c7076234f6ef0, 2022-12-03) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2022.12.0+353 Chrome/102.0.5005.167 Electron/19.1.3 Safari/537.36

here's the version details:

platform       x86_64-w64-mingw32               
arch           x86_64                           
os             mingw32                          
crt            ucrt                             
system         x86_64, mingw32                  
status                                          
major          4                                
minor          2.2                              
year           2022                             
month          10                               
day            31                               
svn rev        83211                            
language       R                                
version.string R version 4.2.2 (2022-10-31 ucrt)
nickname       Innocent and Trusting      type or paste code here

Please don't use screenshots to show what you try to do.
Also indicate which datasets you use. This would make it possible for us to recreate your problem
You mention Quarto: do you get the required output outside of Quarto? E.g. in baseR, RMarkdown or in the console of TStudio? What is your required output?

thanks for the response. I was unable to recreate the ouptut and had to use screenshots to explain how the output is repeatedly being produced incorrectly.

I was using the titanic dataset from kaggle. I am working on my website which is a quarto HTML document. I normally save/load the .Rdata object while working on the blog project. in this case, the required output appears perfectly well in the console and rendered HTML file. Expected result is that the same should appear even in the quarto file that I am working on.

for instance:

> titanic_data %>% 
+     count(embarked, sort = T)
# A tibble: 3 × 2
  embarked     n
  <chr>    <int>
1 S          916
2 C          270
3 Q          123

as opposed to the truncated output showed in the 1st screenshot. hope this conveys the problem. Happy to share any further info as needed.

So your output 'window' is too small in Quarto (?)
The column statement in your chunks is important for this.
See e.g. https://quarto.org/docs/authoring/article-layout.html.

Also the theme that you are using will influence this. Also additional css statements can play a role.
So check these 'Quarto' statements. If you find a reason then fine!

Otherwise include your 'Quarto' document in your next answer: remove all R-code and text so that only the document header(YAML) and the YAML in the R chunks remain. So for the chunk

```{r}
#| label: fig-mtcars
#| fig-cap: "MPG vs horsepower, colored by transmission."
#| column: margin

library(ggplot2)
mtcars2 <- mtcars
mtcars2$am <- factor(
  mtcars$am, labels = c('automatic', 'manual')
)
ggplot(mtcars2, aes(hp, mpg, color = am)) +
  geom_point() +
  geom_smooth(formula = y ~ x, method = "loess") +
  theme(legend.position = 'bottom')
```

only the part below would remain

```{r}
#| label: fig-mtcars
#| fig-cap: "MPG vs horsepower, colored by transmission."
#| column: margin
```

In that way we can try to help you.
Success!

@ramakant Your screenshot shows output from IDE source pane, not a output rendered with Quarto.

Is your issue with the IDE itself ? Or with a content produced in Quarto output like HTML format ?

Thanks

hi @cderv, the problem is with the IDE source pane and not the HTML output.

hi @HanOostdijk , thank you for your detailed response. I maybe mistakenly referring to 'output' in my previous statements. I am speaking of the IDE result that is being shown on RStudio editor pane. The HTML output is perfectly normal. Specifically speaking, the blog post that I've uploaded over here is rendered perfectly right. But the IDE is showing me the output as below:
image

Hope i've been able to explain myself clearly here.

Hello @ramakant ,
I am not familiar with this type of output. I could only partially reproduce it by making a notebook and then use the 'Run Current Chunk' green triangle . However I don't see the truncated output.
I hope that another forum member can help you.
Below the code with a screenprint of the output in the source panel.

---
title: "R Notebook"
output: html_notebook
editor_options: 
  chunk_output_type: inline
---

```{r}
library(dplyr)
iris |> count(Species,sort=T)
```

image

thanks Han and appreciate your time. pinging @cderv in case he may have further additional inputs.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.