Angering qplot? (Causing " evaluation nested too deeply: infinite recursion / options(expressions=)?")

52 views
Skip to first unread message

Jason Rupert

unread,
Sep 25, 2009, 1:11:15 PM9/25/09
to ggp...@googlegroups.com, jasonk...@yahoo.com
Evidently I am angering qplot.

Here is an example of the type of data I'm sending qplot:

rnorm_test_data<-rnorm(1000,3,6)
house_age<-seq(1:1000)

length(rnorm_test_data)
length(house_age)

house_info<-data.frame(rnorm_test_data,
house_age,
Location = c("NA"))

qplot(house_age, data = house_info, binwidth = 1,
fill = factor(as.character(house_info$Location)))

It tells me, and probably correctly:
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?

Is there anyway for "fill" to work properly with a single factor? I think that is causing the problem, i.e. I am sending in a single factor. I was hoping that "fill" would have recognized this and only used a single "fill" color. Do I need to handle this type of situation instead of leaving it up to qplot?

Thank you again for your insights and feedback.



Luciano Selzer

unread,
Sep 25, 2009, 1:43:03 PM9/25/09
to Jason Rupert, ggp...@googlegroups.com
Hi Jason,
Do you want to just fill the geom with one colour?

qplot(house_age, data = house_info, binwidth = 1,
     fill = 'blue')

Hope that's what you wanted

Luciano


2009/9/25 Jason Rupert <jasonk...@yahoo.com>

Jason Rupert

unread,
Sep 25, 2009, 2:18:14 PM9/25/09
to Luciano Selzer, ggp...@googlegroups.com
Luciano,

Thank you for your quick response and the information you provide.

I tried to implement what you suggested, but I still end up with the same result:


> rnorm_test_data<-rnorm(1000,3,6)
> house_age<-seq(1:1000)
>
> length(rnorm_test_data)
[1] 1000
> length(house_age)
[1] 1000
>
> house_info<-data.frame(rnorm_test_data,
+ house_age,
+ Location = c("NA"))
> qplot(house_age, data = house_info, binwidth = 1, fill = 'blue')
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?

Thank you for any further information or advice you might be able to provide.

Here is my system information:

$platform
[1] "i386-pc-mingw32"

$arch
[1] "i386"

$os
[1] "mingw32"

$system
[1] "i386, mingw32"

$status
[1] ""

$major
[1] "2"

$minor
[1] "9.0"

$year
[1] "2009"

$month
[1] "04"

$day
[1] "17"

$`svn rev`
[1] "48333"

$language
[1] "R"

$version.string
[1] "R version 2.9.0 (2009-04-17)"


> sessionInfo(package=NULL)
R version 2.9.0 (2009-04-17)
i386-pc-mingw32


attached base packages:
[1] grid stats graphics grDevices utils datasets methods base

other attached packages:
[1] prob_0.9-1 ggplot2_0.8.3 reshape_0.8.2 RColorBrewer_1.0-2 proto_0.3-8 plyr_0.1.6 nortest_1.0
[8] fBasics_280.74 timeSeries_290.79 timeDate_290.81 vcd_1.2-1 MASS_7.2-46 colorspace_1.0-0
>


--- On Fri, 9/25/09, Luciano Selzer <luciano...@gmail.com> wrote:

Charlotte Wickham

unread,
Sep 25, 2009, 2:30:48 PM9/25/09
to Jason Rupert, ggp...@googlegroups.com
Your code works fine for me. Try a clean R session or maybe updating
R, my sessionInfo():

R version 2.9.1 (2009-06-26)
i386-apple-darwin8.11.1

locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats grDevices utils datasets grid graphics methods
[8] base

other attached packages:
[1] ggplot2_0.8.3 reshape_0.8.3 plyr_0.1.9 proto_0.3-8

baptiste auguie

unread,
Sep 25, 2009, 2:43:59 PM9/25/09
to ggp...@googlegroups.com
your version of plyr looks oldish, try updating it perhaps?

baptiste
--
_____________________________

Baptiste Auguié

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

http://newton.ex.ac.uk/research/emag
______________________________
Reply all
Reply to author
Forward
0 new messages