Not Displaying the data (mpg) in data viewer- in Deducer

20 views
Skip to first unread message

arupd...@gmail.com

unread,
Feb 9, 2018, 4:49:36 PM2/9/18
to Deducer
Hi ,
I am trying to load mpg data in the JGR console. When I type data(mpg) in the lower window of the console, I don't see data is displayed in the data viewer window. However, I when I type head(mpg) in the lower window- the data is displayed in the upper window- but still the data viewer does not display the data set. 

However, when I do the same with another data- Davis- by typing data(Davis) its visible in the Data Viewer  

both mpg and Davis are from R package.

What is the problem and solution?

Thanks in advance
Arup

Ian Fellows

unread,
Feb 9, 2018, 6:19:07 PM2/9/18
to ded...@googlegroups.com
Oddly, it looks like mpg is no longer just a data.frame, so the data viewer doesn’t display it. It is now of class tbl_df. I don’t know if this is a change that happened some time recently. Anyhow, doing

data(mpg)
class(mpg) <- "data.frame"

should get it to display.


Ian





--

---
You received this message because you are subscribed to the Google Groups "Deducer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deducer+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom Hopper

unread,
Feb 9, 2018, 6:29:55 PM2/9/18
to ded...@googlegroups.com
mpg <- as.data.frame(mpg) should also convert it to a plain data frame, and maybe a little more robustly than just fiddling with the class attribute.

I’m surprised that the data viewer doesn’t just handle tibbles as data frames. Is that intentional?

Regards,

Tom
signature.asc
Reply all
Reply to author
Forward
0 new messages