Problem getting plots of projections into R with rggobi

41 views
Skip to first unread message

Raphael Rath

unread,
Sep 24, 2014, 3:54:02 AM9/24/14
to gg...@googlegroups.com
Hello,

I have troubles getting nice looking plots of projections into R:

First I tried to get the olive dataset into R:

>o <- ggobi(ggobi_find_file("data", "olives.csv"))

** (rsession.exe:7804): CRITICAL **: datad_init: assertion `d->nrows > 0' failed   

After that I managed to get it into R like this but it dosent look the same as if I open the dataset in Ggobi with file->open:

olive <- read.table("C:\\Program Files\\ggobi\\data\\olive.csv", header=T, sep=",")
olive <- olive[,-1]
o <-ggobi(olive)

In the next step I wanted to get some projections from a 1D and 2D Tour into R using ggobi_display_get_tour_projection after pausing the projection and i get an error again

display(o[1], "2D Tour")   

ggobi_display_get_tour_projection(o)

** (rsession.exe:7804): CRITICAL **: An R GGobi display object must inherit from class 'GGobiDisplay'

** (rsession.exe:7804): CRITICAL **: RS_GGOBI_getPModeName: assertion `GGOBI_IS_DISPLAY(display)' failed

** (rsession.exe:7804): CRITICAL **: An R GGobi display object must inherit from class 'GGobiDisplay'
Error in .GGobiCall("getTourProjection", gd, pmode(gd)) : 
  CHAR() can only be applied to a 'CHARSXP', not a 'NULL'

Because this did not work I just saved the projections with Save Display Description and read it into R with dd_load. This worked but then there was another problem: The legend covers some of the points and I did not find a way to move it to another postion.
(I tried to attach this file to this post but it says that it is inadmissible)

Hole <- dd_load("...path...\\1DHoles")
plot(Hole)
I also tried print(ggplot(Hole)) which didnt looked better.

Finally my last question: Is it possible to plot a Spineplot in R from a file that I saved with Save Display Description, because in the R-Help it says that this feature is not yet implemented?

Thanks a lot and I apologize for any spelling mistakes, my english is not very good... 

Best regards,
Raphael

Raphael Rath

unread,
Sep 24, 2014, 4:08:32 AM9/24/14
to gg...@googlegroups.com
I now managed to attach the 1DHole file to this mail.



--
You received this message because you are subscribed to a topic in the Google Groups "GGobi users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ggobi/TBooQ6v-UUc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ggobi+un...@googlegroups.com.
To post to this group, send email to gg...@googlegroups.com.
Visit this group at http://groups.google.com/group/ggobi.
For more options, visit https://groups.google.com/d/optout.

1DHoles

Dianne Cook

unread,
Sep 24, 2014, 8:47:28 AM9/24/14
to Raphael Rath, gg...@googlegroups.com
plot(d, axislocation=c(0.8, 0.8))

allows you to set the location of the axes. 

can’t get this to work with the ggplot function, though, only the plot function.

On Sep 24, 2014, at 4:42 AM, Raphael Rath <rath.r...@gmail.com> wrote:

Hello,

I have troubles getting nice looking plots of projections into R:

First I tried to get the olive dataset into R:

>o <- ggobi(ggobi_find_file("data", "olives.csv"))

** (rsession.exe:7804): CRITICAL **: datad_init: assertion `d->nrows > 0' failed   

After that I managed to get it into R like this but it dosent look the same as if I open the dataset in Ggobi with file->open:

olive <- read.table("C:\\Program Files\\ggobi\\data\\olive.csv", header=T, sep=",")
olive <- olive[,-1]
o <-ggobi(olive)

In the next step I wanted to get some projections from a 1D and 2D Tour into R using ggobi_display_get_tour_projection after pausing the projection and i get an error again

display(o[1], "2D Tour")   

ggobi_display_get_tour_projection(o)

** (rsession.exe:7804): CRITICAL **: An R GGobi display object must inherit from class 'GGobiDisplay'

** (rsession.exe:7804): CRITICAL **: RS_GGOBI_getPModeName: assertion `GGOBI_IS_DISPLAY(display)' failed

** (rsession.exe:7804): CRITICAL **: An R GGobi display object must inherit from class 'GGobiDisplay'
Error in .GGobiCall("getTourProjection", gd, pmode(gd)) : 
  CHAR() can only be applied to a 'CHARSXP', not a 'NULL'

Because this did not work I just saved the projections with Save Display Description and read it into R with dd_load. This worked but then there was another problem: The legend covers some of the points and I did not find a way to move it to another postion.
(I attached the file)


Hole <- dd_load("...path...\\1DHoles")
plot(Hole)
I also tried print(ggplot(Hole)) which didnt looked better.

Finally my last question: Is it possible to plot a Spineplot in R from a file that I saved with Save Display Description, because in the R-Help it says that this feature is not yet implemented?

Thanks a lot and I apologize for any spelling mistakes, my english is not so good... 

Best regards,
Raphael
<1DHoles>

---------------------------
Di Cook
vis...@gmail.com



Reply all
Reply to author
Forward
0 new messages