On Fri, 11 Apr 2025, Arnaud Gaboury writes:

> On Fri, 2025-04-11 at 19:33 +0200, Enrico Schumann wrote:
>
> I was just writing the same observation: it is when I run view().
>
> gabx@magnolia [R] short_j <- journal(
> ...   timestamp = short$value,
> ...   amount = short$executed_qty,
> ...   price = short$price,
> ...   instrument = short$symbol
> ... )
> gabx@magnolia [R] View(short_j)
> Error in names[[i]] : subscript out of bounds
>
> As you can see, I can build the short_j journal with no error, but it
> is when I want to view it.
> I use Rstudio on Archlinux.
> When runningĀ 
> R > utils::View(btc_journal)
>
> a pop up window open with the journal in a correct view.
>
> So there is something wrong with Rstudio ? Or any package of my linux
> distro?

I'd go with "It happens with RStudio".  I am not sure View
is supposed to support journals or other non-base datatypes.
But ?utils::View (i.e. the 'real' View) says that
utils::View coerces to data.frame, and since there is an
as.data.frame method for journals, it just works.


[...]


-- 
Enrico Schumann
Lucerne, Switzerland
https://enricoschumann.net

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to