### Bug description

Hi, 

I think I encountered a bug when using `ojs_define` and transposing a data frame for plotting with `ojs`.
If any value in the data frame is 0 then the value will become `undefined` after transposing. 

MWE: 

````md
---
title: transpose bug
---

```{r}
ojs_define(df = data.frame(a = 0, b = 1))
```

```{ojs}
df
```

```{ojs}
transpose(df)
```
````

The output from the first `ojs` cell is as expected: 
```
Object {
  a: Array(1) [0]
  b: Array(1) [1]
}
```

The second cell after transposing converts the original 0 to `undefined`

```
Array(1) [
  0: Object {a: undefined, b: 1}
]
```


### `quarto check` Output

```bash
[>] Checking Quarto installation......OK
      Version: 1.0.37
      Path: redacted
      CodePage: 1252

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.9.12 (Conda)
      Path: redacted
      Jupyter: 4.10.0
      Kernels: julia-1.7, python3

[>] Checking Jupyter engine render....OK

[>] Checking R installation...........OK
      Version: 4.0.5
      Path: redacted
      LibPaths:
        - redacted
      rmarkdown: 2.7

[>] Checking Knitr engine render......OK
```

### `quarto tools check` Output

```bash
Tool         Status            Installed     Latest  
chromium     Not installed     ---           869685
tinytex      Not installed     ---           v2022.07
```

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] documented the quarto version you're running, by pasting the output from running `quarto check` in the "Quarto Check Output" text area?
- [X] documented the version of the quarto tools you're running, by providing the output from running `quarto tools check` in the "Quarto Tools Check Output" text area?
- [ ] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [ ] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [ ] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
cscheid
2022-07-27T13:37:27Z
p-gw
bug
closed
transpose introduces undefined values
https://github.com/quarto-dev/quarto-cli/issues/1546